Class KIP37
- java.lang.Object
-
- com.klaytn.caver.contract.Contract
-
- com.klaytn.caver.kct.kip37.KIP37
-
public class KIP37 extends Contract
The KIP37 class that helps you easily handle a smart contract that implements KIP-37 as a Java instance on the Klaytn blockchain platform.This KIP-37 contract source code based on Klaytn-contracts. Static methods and constructor is accessed via `caver.kct.kip37`.
- See Also:
KIP7Wrapper
,KCTWrapper
,Contract
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KIP37.INTERFACE
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FUNCTION_ADD_MINTER
static java.lang.String
FUNCTION_ADD_PAUSER
static java.lang.String
FUNCTION_BALANCE_OF
static java.lang.String
FUNCTION_BALANCE_OF_BATCH
static java.lang.String
FUNCTION_BURN
static java.lang.String
FUNCTION_BURN_BATCH
static java.lang.String
FUNCTION_CREATE
static java.lang.String
FUNCTION_IS_APPROVED_FOR_ALL
static java.lang.String
FUNCTION_IS_MINTER
static java.lang.String
FUNCTION_IS_PAUSER
static java.lang.String
FUNCTION_MINT
static java.lang.String
FUNCTION_MINT_BATCH
static java.lang.String
FUNCTION_PAUSE
static java.lang.String
FUNCTION_PAUSED
static java.lang.String
FUNCTION_RENOUNCE_MINTER
static java.lang.String
FUNCTION_RENOUNCE_PAUSER
static java.lang.String
FUNCTION_SAFE_BATCH_TRANSFER_FROM
static java.lang.String
FUNCTION_SAFE_TRANSFER_FROM
static java.lang.String
FUNCTION_SET_APPROVED_FOR_ALL
static java.lang.String
FUNCTION_SUPPORTS_INTERFACE
static java.lang.String
FUNCTION_TOTAL_SUPPLY
static java.lang.String
FUNCTION_UNPAUSE
static java.lang.String
FUNCTION_URI
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TransactionReceipt.TransactionReceiptData
addMinter(java.lang.String account)
Adds an account as a minter that has the permission of MinterRole and can mint.TransactionReceipt.TransactionReceiptData
addMinter(java.lang.String account, SendOptions sendParam)
Adds an account as a minter that has the permission of MinterRole and can mint.TransactionReceipt.TransactionReceiptData
addPauser(java.lang.String account)
Adds an account as a pauser that has the permission of PauserRole and can pause.TransactionReceipt.TransactionReceiptData
addPauser(java.lang.String account, SendOptions sendParam)
Adds an account as a pauser that has the permission of PauserRole and can pause.java.math.BigInteger
balanceOf(java.lang.String account, java.lang.String tokenId)
Get the balance of an account's tokens.java.math.BigInteger
balanceOf(java.lang.String account, java.math.BigInteger tokenId)
Get the balance of an account's tokens.java.util.List<java.math.BigInteger>
balanceOfBatch(java.lang.String[] accounts, java.lang.String[] tokenIds)
Get the balance of multiple account / token pairs.java.util.List<java.math.BigInteger>
balanceOfBatch(java.lang.String[] accounts, java.math.BigInteger[] tokenIds)
Get the balance of multiple account / token pairs.TransactionReceipt.TransactionReceiptData
burn(java.lang.String address, java.lang.String tokenId, java.math.BigInteger value)
Burns a token.TransactionReceipt.TransactionReceiptData
burn(java.lang.String address, java.lang.String tokenId, java.math.BigInteger value, SendOptions sendParam)
Burns a token.TransactionReceipt.TransactionReceiptData
burn(java.lang.String address, java.math.BigInteger tokenId, java.math.BigInteger value)
Burns a token.TransactionReceipt.TransactionReceiptData
burn(java.lang.String address, java.math.BigInteger tokenId, java.math.BigInteger value, SendOptions sendParam)
Burns a token.TransactionReceipt.TransactionReceiptData
burnBatch(java.lang.String address, java.lang.String[] tokenIds, java.math.BigInteger[] values)
Burns multiple KIP37 tokens.TransactionReceipt.TransactionReceiptData
burnBatch(java.lang.String address, java.lang.String[] tokenIds, java.math.BigInteger[] values, SendOptions sendParam)
Burns multiple KIP37 tokens.TransactionReceipt.TransactionReceiptData
burnBatch(java.lang.String address, java.math.BigInteger[] tokenIds, java.math.BigInteger[] values)
Burns multiple KIP37 tokens.TransactionReceipt.TransactionReceiptData
burnBatch(java.lang.String address, java.math.BigInteger[] tokenIds, java.math.BigInteger[] values, SendOptions sendParam)
Burns multiple KIP37 tokens.KIP37
clone()
Copy instance.KIP37
clone(java.lang.String tokenAddress)
Copy instance with token address.static KIP37
create(Caver caver)
Creates a KIP37 instance.static KIP37
create(Caver caver, java.lang.String contractAddress)
Creates a KIP37 instance.TransactionReceipt.TransactionReceiptData
create(java.lang.String tokenId, java.math.BigInteger initialSupply)
Creates a new token type and assigns initialSupply to the minter.TransactionReceipt.TransactionReceiptData
create(java.lang.String tokenId, java.math.BigInteger initialSupply, SendOptions sendParam)
Creates a new token type and assigns initialSupply to the minter.TransactionReceipt.TransactionReceiptData
create(java.lang.String tokenId, java.math.BigInteger initialSupply, java.lang.String uri)
Creates a new token type and assigns initialSupply to the minter.TransactionReceipt.TransactionReceiptData
create(java.lang.String tokenId, java.math.BigInteger initialSupply, java.lang.String uri, SendOptions sendParam)
Creates a new token type and assigns initialSupply to the minter.TransactionReceipt.TransactionReceiptData
create(java.math.BigInteger tokenId, java.math.BigInteger initialSupply)
Creates a new token type and assigns initialSupply to the minter.TransactionReceipt.TransactionReceiptData
create(java.math.BigInteger tokenId, java.math.BigInteger initialSupply, SendOptions sendParam)
Creates a new token type and assigns initialSupply to the minter.TransactionReceipt.TransactionReceiptData
create(java.math.BigInteger tokenId, java.math.BigInteger initialSupply, java.lang.String uri)
Creates a new token type and assigns initialSupply to the minter.TransactionReceipt.TransactionReceiptData
create(java.math.BigInteger tokenId, java.math.BigInteger initialSupply, java.lang.String uri, SendOptions sendParam)
Creates a new token type and assigns initialSupply to the minter.static KIP37
deploy(Caver caver, KIP37DeployParams tokenInfo, SendOptions sendOptions)
Deploy a KIP-37 contract.static KIP37
deploy(Caver caver, KIP37DeployParams tokenInfo, SendOptions sendOptions, IWallet wallet)
Deploy a KIP-37 contract.static KIP37
deploy(Caver caver, KIP37DeployParams tokenInfo, java.lang.String deployer)
Deploy a KIP-37 contract.static KIP37
deploy(Caver caver, KIP37DeployParams tokenInfo, java.lang.String deployer, IWallet wallet)
Deploy a KIP-37 contract.static KIP37
deploy(Caver caver, java.lang.String uri, SendOptions sendOptions)
Deploy a KIP-37 contract.static KIP37
deploy(Caver caver, java.lang.String uri, SendOptions sendOptions, IWallet wallet)
Deploy a KIP-37 contract.static KIP37
deploy(Caver caver, java.lang.String uri, java.lang.String deployer)
Deploy a KIP-37 contract.static KIP37
deploy(Caver caver, java.lang.String uri, java.lang.String deployer, IWallet wallet)
Deploy a KIP-37 contract.java.util.Map<java.lang.String,java.lang.Boolean>
detectInterface()
Detects which interface the KIP-37 token contract supports.static java.util.Map<java.lang.String,java.lang.Boolean>
detectInterface(Caver caver, java.lang.String contractAddress)
Detects which interface the KIP-37 token contract supports.boolean
isApprovedForAll(java.lang.String owner, java.lang.String operator)
Get the approval status of an operator for a given owner.boolean
isMinter(java.lang.String account)
Checks if specific account has the Minter role.boolean
isPauser(java.lang.String account)
Checks if specific account has Pauser role.TransactionReceipt.TransactionReceiptData
mint(java.lang.String[] toList, java.lang.String tokenId, java.math.BigInteger[] values)
Mints tokens of the specific token type.TransactionReceipt.TransactionReceiptData
mint(java.lang.String[] toList, java.lang.String tokenId, java.math.BigInteger[] values, SendOptions sendParam)
Mints tokens of the specific token type.TransactionReceipt.TransactionReceiptData
mint(java.lang.String[] toList, java.math.BigInteger tokenId, java.math.BigInteger[] values)
Mints tokens of the specific token type.TransactionReceipt.TransactionReceiptData
mint(java.lang.String[] toList, java.math.BigInteger tokenId, java.math.BigInteger[] values, SendOptions sendParam)
Mints tokens of the specific token type.TransactionReceipt.TransactionReceiptData
mint(java.lang.String to, java.lang.String tokenId, java.math.BigInteger value)
Mints token of the specific token type.TransactionReceipt.TransactionReceiptData
mint(java.lang.String to, java.lang.String tokenId, java.math.BigInteger value, SendOptions sendParam)
Mints token of the specific token type.TransactionReceipt.TransactionReceiptData
mint(java.lang.String to, java.math.BigInteger tokenId, java.math.BigInteger value)
Mints token of the specific token type.TransactionReceipt.TransactionReceiptData
mint(java.lang.String to, java.math.BigInteger tokenId, java.math.BigInteger value, SendOptions sendParam)
Mints token of the specific token type.TransactionReceipt.TransactionReceiptData
mintBatch(java.lang.String to, java.lang.String[] tokenIds, java.math.BigInteger[] values)
Mints multiple KIP-37 tokens of the specific token types.TransactionReceipt.TransactionReceiptData
mintBatch(java.lang.String to, java.lang.String[] tokenIds, java.math.BigInteger[] values, SendOptions sendParam)
Mints multiple KIP-37 tokens of the specific token types.TransactionReceipt.TransactionReceiptData
mintBatch(java.lang.String to, java.math.BigInteger[] tokenIds, java.math.BigInteger[] values)
Mints multiple KIP-37 tokens of the specific token types.TransactionReceipt.TransactionReceiptData
mintBatch(java.lang.String to, java.math.BigInteger[] tokenIds, java.math.BigInteger[] values, SendOptions sendParam)
Mints multiple KIP-37 tokens of the specific token types.TransactionReceipt.TransactionReceiptData
pause()
Pause a contract.TransactionReceipt.TransactionReceiptData
pause(SendOptions sendParam)
Pause a contract.TransactionReceipt.TransactionReceiptData
pause(java.lang.String tokenId)
Pauses a specific token.TransactionReceipt.TransactionReceiptData
pause(java.lang.String tokenId, SendOptions sendParam)
Pauses a specific token.TransactionReceipt.TransactionReceiptData
pause(java.math.BigInteger tokenId)
Pauses a specific token.TransactionReceipt.TransactionReceiptData
pause(java.math.BigInteger tokenId, SendOptions sendParam)
Pauses a specific token.boolean
paused()
Check if contract has been paused state.boolean
paused(java.lang.String tokenId)
Check if token has been paused state.boolean
paused(java.math.BigInteger tokenId)
Check if token has been paused state.TransactionReceipt.TransactionReceiptData
renounceMinter()
Renounces privilege of MinterRole from an account.TransactionReceipt.TransactionReceiptData
renounceMinter(SendOptions sendParam)
Renounces privilege of MinterRole from an account.TransactionReceipt.TransactionReceiptData
renouncePauser()
Renounces privilege of PauserRole from an account.TransactionReceipt.TransactionReceiptData
renouncePauser(SendOptions sendParam)
Renounces privilege of PauserRole from an account.TransactionReceipt.TransactionReceiptData
safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.lang.String[] tokenIds, java.math.BigInteger[] amounts)
Batch-operation version ofsafeTransferFrom(String, String, String, BigInteger, String)
.TransactionReceipt.TransactionReceiptData
safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.lang.String[] tokenIds, java.math.BigInteger[] amounts, SendOptions sendParam)
Batch-operation version ofsafeTransferFrom(String, String, String, BigInteger, String, SendOptions)
.TransactionReceipt.TransactionReceiptData
safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.lang.String[] tokenIds, java.math.BigInteger[] amounts, java.lang.String data)
Batch-operation version ofsafeTransferFrom(String, String, String, BigInteger, String)
.TransactionReceipt.TransactionReceiptData
safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.lang.String[] tokenIds, java.math.BigInteger[] amounts, java.lang.String data, SendOptions sendParam)
Batch-operation version ofsafeTransferFrom(String, String, String, BigInteger, String, SendOptions)
.TransactionReceipt.TransactionReceiptData
safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger[] tokenIds, java.math.BigInteger[] amounts)
Batch-operation version ofsafeTransferFrom(String, String, BigInteger, BigInteger, String)
TransactionReceipt.TransactionReceiptData
safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger[] tokenIds, java.math.BigInteger[] amounts, SendOptions sendParam)
Batch-operation version ofsafeTransferFrom(String, String, BigInteger, BigInteger, String, SendOptions)
.TransactionReceipt.TransactionReceiptData
safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger[] tokenIds, java.math.BigInteger[] amounts, java.lang.String data)
Batch-operation version ofsafeTransferFrom(String, String, BigInteger, BigInteger, String)
TransactionReceipt.TransactionReceiptData
safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger[] tokenIds, java.math.BigInteger[] amounts, java.lang.String data, SendOptions sendParam)
Batch-operation version ofsafeTransferFrom(String, String, BigInteger, BigInteger, String, SendOptions)
.TransactionReceipt.TransactionReceiptData
safeTransferFrom(java.lang.String from, java.lang.String to, java.lang.String tokenId, java.math.BigInteger value)
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.TransactionReceipt.TransactionReceiptData
safeTransferFrom(java.lang.String from, java.lang.String to, java.lang.String tokenId, java.math.BigInteger value, SendOptions sendParam)
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.TransactionReceipt.TransactionReceiptData
safeTransferFrom(java.lang.String from, java.lang.String to, java.lang.String tokenId, java.math.BigInteger value, java.lang.String data)
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.TransactionReceipt.TransactionReceiptData
safeTransferFrom(java.lang.String from, java.lang.String to, java.lang.String tokenId, java.math.BigInteger value, java.lang.String data, SendOptions sendParam)
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.TransactionReceipt.TransactionReceiptData
safeTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger tokenId, java.math.BigInteger value)
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.TransactionReceipt.TransactionReceiptData
safeTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger tokenId, java.math.BigInteger value, SendOptions sendParam)
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.TransactionReceipt.TransactionReceiptData
safeTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger tokenId, java.math.BigInteger value, java.lang.String data)
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.TransactionReceipt.TransactionReceiptData
safeTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger tokenId, java.math.BigInteger value, java.lang.String data, SendOptions sendParam)
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.TransactionReceipt.TransactionReceiptData
setApprovalForAll(java.lang.String operator, boolean approved)
Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.TransactionReceipt.TransactionReceiptData
setApprovalForAll(java.lang.String operator, boolean approved, SendOptions sendParam)
Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.boolean
supportsInterface(java.lang.String interfaceId)
Call method "supportsInterface" in KIP-13 standard contract.java.math.BigInteger
totalSupply(java.lang.String tokenId)
Get the total supply of the token type requested.java.math.BigInteger
totalSupply(java.math.BigInteger tokenId)
Get the total supply of the token type requested.TransactionReceipt.TransactionReceiptData
unpause()
Unpauses a contract.TransactionReceipt.TransactionReceiptData
unpause(SendOptions sendParam)
Unpauses a contract.TransactionReceipt.TransactionReceiptData
unpause(java.lang.String tokenId)
Unpauses a specific token.TransactionReceipt.TransactionReceiptData
unpause(java.lang.String tokenId, SendOptions sendParam)
Unpauses a specific token.TransactionReceipt.TransactionReceiptData
unpause(java.math.BigInteger tokenId)
Unpauses a specific token.TransactionReceipt.TransactionReceiptData
unpause(java.math.BigInteger tokenId, SendOptions sendParam)
Unpauses a specific token.java.lang.String
uri(java.lang.String tokenId)
Get a URI(Uniform Resource Identifier) for a given token ID.java.lang.String
uri(java.math.BigInteger tokenId)
Get a URI(Uniform Resource Identifier) for a given token ID.-
Methods inherited from class com.klaytn.caver.contract.Contract
call, call, callWithSolidityType, callWithSolidityType, create, decodeFunctionCall, deploy, deploy, deploy, deploy, encodeABI, encodeABIWithSolidityType, estimateGas, estimateGasWithSolidityType, findContractMethodBySignature, getAbi, getCaver, getConstructor, getContractAddress, getDefaultSendOptions, getEvent, getEvents, getMethod, getMethods, getPastEvent, getWallet, once, send, send, send, sendWithSolidityType, sendWithSolidityType, sendWithSolidityType, setDefaultSendOptions, setWallet, sign, sign, signAsFeePayer, signAsFeePayer, signAsFeePayerWithSolidityType, signAsFeePayerWithSolidityType, signWithSolidityType, signWithSolidityType, subscribe
-
-
-
-
Field Detail
-
FUNCTION_URI
public static final java.lang.String FUNCTION_URI
- See Also:
- Constant Field Values
-
FUNCTION_BALANCE_OF
public static final java.lang.String FUNCTION_BALANCE_OF
- See Also:
- Constant Field Values
-
FUNCTION_BALANCE_OF_BATCH
public static final java.lang.String FUNCTION_BALANCE_OF_BATCH
- See Also:
- Constant Field Values
-
FUNCTION_SET_APPROVED_FOR_ALL
public static final java.lang.String FUNCTION_SET_APPROVED_FOR_ALL
- See Also:
- Constant Field Values
-
FUNCTION_IS_APPROVED_FOR_ALL
public static final java.lang.String FUNCTION_IS_APPROVED_FOR_ALL
- See Also:
- Constant Field Values
-
FUNCTION_TOTAL_SUPPLY
public static final java.lang.String FUNCTION_TOTAL_SUPPLY
- See Also:
- Constant Field Values
-
FUNCTION_SAFE_TRANSFER_FROM
public static final java.lang.String FUNCTION_SAFE_TRANSFER_FROM
- See Also:
- Constant Field Values
-
FUNCTION_SAFE_BATCH_TRANSFER_FROM
public static final java.lang.String FUNCTION_SAFE_BATCH_TRANSFER_FROM
- See Also:
- Constant Field Values
-
FUNCTION_BURN
public static final java.lang.String FUNCTION_BURN
- See Also:
- Constant Field Values
-
FUNCTION_BURN_BATCH
public static final java.lang.String FUNCTION_BURN_BATCH
- See Also:
- Constant Field Values
-
FUNCTION_CREATE
public static final java.lang.String FUNCTION_CREATE
- See Also:
- Constant Field Values
-
FUNCTION_MINT
public static final java.lang.String FUNCTION_MINT
- See Also:
- Constant Field Values
-
FUNCTION_MINT_BATCH
public static final java.lang.String FUNCTION_MINT_BATCH
- See Also:
- Constant Field Values
-
FUNCTION_PAUSED
public static final java.lang.String FUNCTION_PAUSED
- See Also:
- Constant Field Values
-
FUNCTION_PAUSE
public static final java.lang.String FUNCTION_PAUSE
- See Also:
- Constant Field Values
-
FUNCTION_UNPAUSE
public static final java.lang.String FUNCTION_UNPAUSE
- See Also:
- Constant Field Values
-
FUNCTION_IS_PAUSER
public static final java.lang.String FUNCTION_IS_PAUSER
- See Also:
- Constant Field Values
-
FUNCTION_ADD_PAUSER
public static final java.lang.String FUNCTION_ADD_PAUSER
- See Also:
- Constant Field Values
-
FUNCTION_RENOUNCE_PAUSER
public static final java.lang.String FUNCTION_RENOUNCE_PAUSER
- See Also:
- Constant Field Values
-
FUNCTION_IS_MINTER
public static final java.lang.String FUNCTION_IS_MINTER
- See Also:
- Constant Field Values
-
FUNCTION_ADD_MINTER
public static final java.lang.String FUNCTION_ADD_MINTER
- See Also:
- Constant Field Values
-
FUNCTION_RENOUNCE_MINTER
public static final java.lang.String FUNCTION_RENOUNCE_MINTER
- See Also:
- Constant Field Values
-
FUNCTION_SUPPORTS_INTERFACE
public static final java.lang.String FUNCTION_SUPPORTS_INTERFACE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
KIP37
public KIP37(Caver caver) throws java.io.IOException
Creates a KIP37 instance.- Parameters:
caver
- A Caver instance.- Throws:
java.io.IOException
-
KIP37
public KIP37(Caver caver, java.lang.String contractAddress) throws java.io.IOException
Creates a KIP37 instance.- Parameters:
caver
- A Caver instancecontractAddress
- A contract address.- Throws:
java.io.IOException
-
-
Method Detail
-
create
public static KIP37 create(Caver caver) throws java.io.IOException
Creates a KIP37 instance.Example
KIP37 kip37 = caver.kct.kip37.create();
- Parameters:
caver
- A Caver instance.- Returns:
- KIP37
- Throws:
java.io.IOException
-
create
public static KIP37 create(Caver caver, java.lang.String contractAddress) throws java.io.IOException
Creates a KIP37 instance.Example
String contractAddress = "0x{contractAddress}"; KIP37 kip37 = caver.kct.kip37.create(contractAddress);
- Parameters:
caver
- A Caver instance.contractAddress
- A contract address- Returns:
- KIP37
- Throws:
java.io.IOException
-
deploy
public static KIP37 deploy(Caver caver, java.lang.String uri, java.lang.String deployer) throws java.io.IOException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Deploy a KIP-37 contract.The deployer's keyring should be existed in `caver.wallet`. See
KeyringContainer
andIWallet
.Example :
String deployerAddress = "0x{deployerAddress}"; String uri = "uri"; KIP37 kip37 = caver.kct.kip37.deploy(uri, deployerAddress);
- Parameters:
caver
- A Caver instance.uri
- The URI for token type.deployer
- A deployer's address.- Returns:
- KIP37
- Throws:
java.io.IOException
java.lang.NoSuchMethodException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
deploy
public static KIP37 deploy(Caver caver, java.lang.String uri, SendOptions sendOptions) throws java.io.IOException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Deploy a KIP-37 contract.The deployer's keyring should be existed in `caver.wallet`. See
KeyringContainer
andIWallet
.If you want to deploy a contract using fee delegation transaction, you can create and send a fee delegated transaction through setting a fee delegation field in SendOptions.
Example :
String uri = "uri"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom("0x{deployerAddress}"); sendOptions.setGas(BigInteger.valueOf(gas value)); sendOptions.setFeeDelegation(true); sendOptions.setFeePayer("0x{feePayerAddress}"); KIP37 kip37 = caver.kct.kip37.deploy(uri, sendOptions);
- Parameters:
caver
- A Caver instance.uri
- The URI for token type.sendOptions
- The send options to deploy a contract.- Returns:
- KIP37
- Throws:
java.io.IOException
java.lang.NoSuchMethodException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
deploy
public static KIP37 deploy(Caver caver, java.lang.String uri, java.lang.String deployer, IWallet wallet) throws java.io.IOException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Deploy a KIP-37 contract.The deployer's keyring should be existed in `caver.wallet`.
The wallet used in the contract is set with the wallet that implements the IWallet interface passed as a parameter of the method.
Example :
String deployerAddress = "0x{deployerAddress}"; String uri = "uri"; KIP37 kip37 = caver.kct.kip37.deploy(uri, deployerAddress, caver.getWallet());
- Parameters:
caver
- A Caver instance.uri
- The URI for token type.deployer
- A deployer's address.wallet
- The class instance implemented IWallet to sign transaction.- Returns:
- KIP37
- Throws:
java.io.IOException
java.lang.NoSuchMethodException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
deploy
public static KIP37 deploy(Caver caver, java.lang.String uri, SendOptions sendOptions, IWallet wallet) throws java.io.IOException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Deploy a KIP-37 contract.The deployer's keyring should be existed in `caver.wallet`.
The wallet used in the contract is set with the wallet that implements the IWallet interface passed as a parameter of the method.
If you want to deploy a contract using fee delegation transaction, you can create and send a fee delegated transaction through setting a fee delegation field in SendOptions.
Example :
String uri = "uri"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom("0x{deployerAddress}"); sendOptions.setGas(BigInteger.valueOf(gas value)); sendOptions.setFeeDelegation(true); sendOptions.setFeePayer("0x{feePayerAddress}"); KIP37 kip37 = caver.kct.kip37.deploy(uri, sendOptions, caver.getWallet());
- Parameters:
caver
- A Caver instance.uri
- The URI for token type.sendOptions
- The send options to deploy a contract.wallet
- The class instance implemented IWallet to sign transaction.- Returns:
- KIP37
- Throws:
java.io.IOException
java.lang.NoSuchMethodException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
deploy
public static KIP37 deploy(Caver caver, KIP37DeployParams tokenInfo, java.lang.String deployer) throws org.web3j.protocol.exceptions.TransactionException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException
Deploy a KIP-37 contract.The deployer's keyring should be existed in `caver.wallet`.
Example :
String deployerAddress = "0x{deployerAddress}"; String uri = "uri"; KIP37DeployParams deployInfo = new KIP37DeployParams(uri); KIP37 kip37 = caver.kct.kip37.deploy(deployInfo, deployerAddress);
- Parameters:
caver
- A Caver instance.tokenInfo
- The KIP-37 contract's deploy parameter values.deployer
- A deployer's address- Returns:
- KIP37
- Throws:
org.web3j.protocol.exceptions.TransactionException
java.io.IOException
java.lang.ClassNotFoundException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.InstantiationException
java.lang.IllegalAccessException
-
deploy
public static KIP37 deploy(Caver caver, KIP37DeployParams tokenInfo, SendOptions sendOptions) throws org.web3j.protocol.exceptions.TransactionException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException
Deploy a KIP-37 contract.The deployer's keyring should be existed in `caver.wallet`.
If you want to deploy a contract using fee delegation transaction, you can create and send a fee delegated transaction through setting a fee delegation field in SendOptions.
Example :
String uri = "uri"; KIP37DeployParams deployInfo = new KIP37DeployParams(uri); SendOptions sendOptions = new SendOptions(); sendOptions.setFrom("0x{deployerAddress}"); sendOptions.setGas(BigInteger.valueOf(gas value)); sendOptions.setFeeDelegation(true); sendOptions.setFeePayer("0x{feePayerAddress}"); KIP37 kip37 = caver.kct.kip37.deploy(deployInfo, sendOptions);
- Parameters:
caver
- A Caver instance.tokenInfo
- The KIP-37 contract's deploy parameter values.sendOptions
- The send options to deploy a contract.- Returns:
- KIP37
- Throws:
org.web3j.protocol.exceptions.TransactionException
java.io.IOException
java.lang.ClassNotFoundException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.InstantiationException
java.lang.IllegalAccessException
-
deploy
public static KIP37 deploy(Caver caver, KIP37DeployParams tokenInfo, java.lang.String deployer, IWallet wallet) throws java.io.IOException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Deploy a KIP-37 contract.The deployer's keyring should be existed in `caver.wallet`.
The wallet used in the contract is set with the wallet that implements the IWallet interface passed as a parameter of the method.
Example :
String deployerAddress = "0x{deployerAddress}"; String uri = "uri"; KIP37DeployParams deployInfo = new KIP37DeployParams(uri); KIP37 kip37 = caver.kct.kip37.deploy(deployInfo, sendOptions, caver.getWallet);
- Parameters:
caver
- A Caver instance.tokenInfo
- The KIP-37 contract's deploy parameter values.deployer
- A deployer's addresswallet
- The class instance implemented IWallet to sign transaction.- Returns:
- KIP37
- Throws:
java.io.IOException
java.lang.NoSuchMethodException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
deploy
public static KIP37 deploy(Caver caver, KIP37DeployParams tokenInfo, SendOptions sendOptions, IWallet wallet) throws org.web3j.protocol.exceptions.TransactionException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException
Deploy a KIP-37 contract.The deployer's keyring should be existed in `caver.wallet`.
The wallet used in the contract is set with the wallet that implements the IWallet interface passed as a parameter of the method.
Example :
String uri = "uri"; KIP37DeployParams deployInfo = new KIP37DeployParams(uri); SendOptions sendOptions = new SendOptions(); sendOptions.setFrom("0x{deployerAddress}"); sendOptions.setGas(BigInteger.valueOf(gas value)); sendOptions.setFeeDelegation(true); sendOptions.setFeePayer("0x{feePayerAddress}"); KIP37 kip37 = caver.kct.kip37.deploy(deployInfo, sendOptions, caver.getWallet());
- Parameters:
caver
- A Caver instancetokenInfo
- The KIP-37 contract's deploy parameter values.sendOptions
- The send options to deploy a contract.wallet
- The class instance implemented IWallet to sign transaction.- Returns:
- KIP37
- Throws:
org.web3j.protocol.exceptions.TransactionException
java.io.IOException
java.lang.ClassNotFoundException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.InstantiationException
java.lang.IllegalAccessException
-
clone
public KIP37 clone()
Copy instance.Example :
KIP37 cloned = kip37.clone();
- Overrides:
clone
in classjava.lang.Object
- Returns:
- KIP37
-
clone
public KIP37 clone(java.lang.String tokenAddress)
Copy instance with token address.Example :
String contractAddress = "0x{contractAddress}"; KIP37 cloned = kip37.clone(contractAddress);
- Parameters:
tokenAddress
- A KIP-37 token address- Returns:
- KIP37
-
detectInterface
public static java.util.Map<java.lang.String,java.lang.Boolean> detectInterface(Caver caver, java.lang.String contractAddress)
Detects which interface the KIP-37 token contract supports.Example :
Map<String, Boolean> result = KIP37.detectInterface(); result.get(KIP37.INTERFACE_ID_IKIP37); result.get(KIP37.INTERFACE_ID_IKIP37_BURNABLE); result.get(KIP37.INTERFACE_ID_IKIP37_METADATA); result.get(KIP37.INTERFACE_ID_IKIP37_MINTABLE); result.get(KIP37.INTERFACE_ID_IKIP37_PAUSABLE);
- Parameters:
caver
- A Caver instance.contractAddress
- A contract instance- Returns:
- Map<String, Boolean>
-
detectInterface
public java.util.Map<java.lang.String,java.lang.Boolean> detectInterface()
Detects which interface the KIP-37 token contract supports.Example :
KIP37 kip37 = new KIP37("0x{contract_address}"); Map<String, Boolean> result = kip37.detectInterface(); result.get(KIP37.INTERFACE_ID_IKIP37); result.get(KIP37.INTERFACE_ID_IKIP37_BURNABLE); result.get(KIP37.INTERFACE_ID_IKIP37_METADATA); result.get(KIP37.INTERFACE_ID_IKIP37_MINTABLE); result.get(KIP37.INTERFACE_ID_IKIP37_PAUSABLE);
- Returns:
- Map<String, Boolean>
-
uri
public java.lang.String uri(java.lang.String tokenId) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Get a URI(Uniform Resource Identifier) for a given token ID.Example :
String tokenId = "0x1"; String uri = kip37.uri(tokenId);
- Parameters:
tokenId
- The token id(hex string)- Returns:
- String
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
uri
public java.lang.String uri(java.math.BigInteger tokenId) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Get a URI(Uniform Resource Identifier) for a given token ID.Example :
BigInteger tokenId = BigInteger.ONE; String uri = kip37.uri(tokenId);
- Parameters:
tokenId
- The token id(integer)- Returns:
- String
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
balanceOf
public java.math.BigInteger balanceOf(java.lang.String account, java.lang.String tokenId) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Get the balance of an account's tokens.Example :
String account = "0x{accountAddress}"; String tokenId = "0x1"; BigInteger balance = kip37.balanceOf(account, tokenId);
- Parameters:
account
- The address of the token holder.tokenId
- The ID of the token(hex string).- Returns:
- BigInteger
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
balanceOf
public java.math.BigInteger balanceOf(java.lang.String account, java.math.BigInteger tokenId) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Get the balance of an account's tokens.Example :
String account = "0x{accountAddress}"; BigInteger tokenId = BigInteger.ONE; BigInteger balance = kip37.balanceOf(account, tokenId);
- Parameters:
account
- The address of the token holder.tokenId
- The ID of the token(integer).- Returns:
- BigInteger
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
balanceOfBatch
public java.util.List<java.math.BigInteger> balanceOfBatch(java.lang.String[] accounts, java.lang.String[] tokenIds) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Get the balance of multiple account / token pairs.Example :
String[] accounts = new String[] {....}; String[] tokenIds = new String[] {....}; List<BigInteger> balances = kip37.balanceOf(accounts, tokenIds);
- Parameters:
accounts
- The addresses of the token holders.tokenIds
- IDs of the tokens(hex string)- Returns:
- List
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
balanceOfBatch
public java.util.List<java.math.BigInteger> balanceOfBatch(java.lang.String[] accounts, java.math.BigInteger[] tokenIds) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Get the balance of multiple account / token pairs.Example :
String[] accounts = new String[] {....}; BigInteger[] tokenIds = new BigInteger[] {....}; List<BigInteger> balances = kip37.balanceOf(accounts, tokenIds);
- Parameters:
accounts
- The addresses of the token holders.tokenIds
- IDs of the tokens(integer)- Returns:
- List
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
safeTransferFrom
public TransactionReceipt.TransactionReceiptData safeTransferFrom(java.lang.String from, java.lang.String to, java.lang.String tokenId, java.math.BigInteger value) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.Caller must be approved to manage the tokens being transferred out of the 'from' account.
It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; String tokenId = "0x1"; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, value);
- Parameters:
from
- Source address.to
- Target address.tokenId
- ID of the token type(hex string).value
- Transfer amount.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
safeTransferFrom
public TransactionReceipt.TransactionReceiptData safeTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger tokenId, java.math.BigInteger value) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.Caller must be approved to manage the tokens being transferred out of the 'from' account.
It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; BigInteger tokenId = BigInteger.ONE; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, value);
- Parameters:
from
- Source address.to
- Target address.tokenId
- ID of the token type(integer)value
- Transfer amount.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
safeTransferFrom
public TransactionReceipt.TransactionReceiptData safeTransferFrom(java.lang.String from, java.lang.String to, java.lang.String tokenId, java.math.BigInteger value, java.lang.String data) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.Caller must be approved to manage the tokens being transferred out of the 'from' account.
It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; String tokenId = "0x1"; BigInteger value = BigInteger.ONE; String data = "data"; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, value, data);
- Parameters:
from
- Source address.to
- Target address.tokenId
- ID of the token type(hex string).value
- Transfer amount.data
- Additional data with no specified format.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
safeTransferFrom
public TransactionReceipt.TransactionReceiptData safeTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger tokenId, java.math.BigInteger value, java.lang.String data) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.Caller must be approved to manage the tokens being transferred out of the 'from' account.
It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; BigInteger tokenId = BigInteger.ONE; BigInteger value = BigInteger.ONE; String data = "data"; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, value, data);
- Parameters:
from
- Source address.to
- Target address.tokenId
- ID of the token type(integer)value
- Transfer amount.data
- Additional data with no specified format.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
safeTransferFrom
public TransactionReceipt.TransactionReceiptData safeTransferFrom(java.lang.String from, java.lang.String to, java.lang.String tokenId, java.math.BigInteger value, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.Caller must be approved to manage the tokens being transferred out of the 'from' account.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; String tokenId = "0x1"; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, value, snedOptions);
- Parameters:
from
- Source address.to
- Target address.tokenId
- ID of the token type(hex string)value
- Transfer amount.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
safeTransferFrom
public TransactionReceipt.TransactionReceiptData safeTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger tokenId, java.math.BigInteger value, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.Caller must be approved to manage the tokens being transferred out of the 'from' account.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; BigInteger tokenId = BigInteger.ONE; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, value, sendOptions);
- Parameters:
from
- Source address.to
- Target address.tokenId
- ID of the token type(integer)value
- Transfer amount.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
safeTransferFrom
public TransactionReceipt.TransactionReceiptData safeTransferFrom(java.lang.String from, java.lang.String to, java.lang.String tokenId, java.math.BigInteger value, java.lang.String data, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.Caller must be approved to manage the tokens being transferred out of the 'from' account.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; String tokenId = "0x1"; BigInteger value = BigInteger.ONE; String data = "data"; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, value, data, sendOptions);
- Parameters:
from
- Source address.to
- Target address.tokenId
- ID of the token type(hex string)value
- Transfer amount.data
- Additional data with no specified format.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
safeTransferFrom
public TransactionReceipt.TransactionReceiptData safeTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger tokenId, java.math.BigInteger value, java.lang.String data, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Transfers value amount of an 'id' from the 'from' address to the 'to' address specified.Caller must be approved to manage the tokens being transferred out of the 'from' account.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; BigInteger tokenId = BigInteger.ONE; BigInteger value = BigInteger.ONE; String data = "data"; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, value, data, sendOptions);
- Parameters:
from
- Source address.to
- Target address.tokenId
- ID of the token type(integer)value
- Transfer amount.data
- Additional data with no specified format.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
safeBatchTransferFrom
public TransactionReceipt.TransactionReceiptData safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.lang.String[] tokenIds, java.math.BigInteger[] amounts, java.lang.String data) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Batch-operation version ofsafeTransferFrom(String, String, String, BigInteger, String)
.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; String[] tokenIds = new String[]{....}; BigInteger[] amounts = new BigInteger[]{....}; String data = "data"; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenIds, amounts, data);
- Parameters:
from
- Source address.to
- Target address.tokenIds
- IDs of token type(hex string)amounts
- The amount of transfer corresponding to each token IDdata
- Additional data with no specified format.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
safeBatchTransferFrom
public TransactionReceipt.TransactionReceiptData safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger[] tokenIds, java.math.BigInteger[] amounts) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Batch-operation version ofsafeTransferFrom(String, String, BigInteger, BigInteger, String)
It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; BigInteger[] tokenIds = new String[]{....}; BigInteger[] amounts = new BigInteger[]{....}; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenIds, amounts);
- Parameters:
from
- Source address.to
- Target address.tokenIds
- IDs of token type(integer)amounts
- The amount of transfer corresponding to each token ID- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
safeBatchTransferFrom
public TransactionReceipt.TransactionReceiptData safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.lang.String[] tokenIds, java.math.BigInteger[] amounts) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Batch-operation version ofsafeTransferFrom(String, String, String, BigInteger, String)
.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; String[] tokenIds = new String[]{....}; BigInteger[] amounts = new BigInteger[]{....}; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, amounts);
- Parameters:
from
- Source address.to
- Target address.tokenIds
- IDs of token type(hex string)amounts
- The amount of transfer corresponding to each token ID- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
safeBatchTransferFrom
public TransactionReceipt.TransactionReceiptData safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger[] tokenIds, java.math.BigInteger[] amounts, java.lang.String data) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Batch-operation version ofsafeTransferFrom(String, String, BigInteger, BigInteger, String)
It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; BigInteger[] tokenIds = new BigInteger[]{....}; BigInteger[] amounts = new BigInteger[]{....}; String data = "data"; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, value, data);
- Parameters:
from
- Source address.to
- Target address.tokenIds
- IDs of token type(integer)amounts
- The amount of transfer corresponding to each token IDdata
- Additional data with no specified format.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
safeBatchTransferFrom
public TransactionReceipt.TransactionReceiptData safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.lang.String[] tokenIds, java.math.BigInteger[] amounts, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Batch-operation version ofsafeTransferFrom(String, String, String, BigInteger, String, SendOptions)
.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; String[] tokenIds = new String[]{....}; BigInteger[] amounts = new BigInteger[]{....}; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, amounts, sendOptions);
- Parameters:
from
- Source address.to
- Target address.tokenIds
- IDs of token type(hex string)amounts
- The amount of transfer corresponding to each token IDsendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
safeBatchTransferFrom
public TransactionReceipt.TransactionReceiptData safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger[] tokenIds, java.math.BigInteger[] amounts, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Batch-operation version ofsafeTransferFrom(String, String, BigInteger, BigInteger, String, SendOptions)
.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; BigInteger[] tokenIds = new BigInteger[]{....}; BigInteger[] amounts = new BigInteger[]{....}; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, amounts, sendOptions);
- Parameters:
from
- Source address.to
- Target address.tokenIds
- IDs of token type(integer)amounts
- The amount of transfer corresponding to each token IDsendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
safeBatchTransferFrom
public TransactionReceipt.TransactionReceiptData safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.lang.String[] tokenIds, java.math.BigInteger[] amounts, java.lang.String data, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Batch-operation version ofsafeTransferFrom(String, String, String, BigInteger, String, SendOptions)
.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; String[] tokenIds = new String[]{....}; BigInteger[] amounts = new BigInteger[]{....}; String data = "data"; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, amounts, data, sendOptions);
- Parameters:
from
- Source address.to
- Target address.tokenIds
- IDs of token type(hex string)amounts
- The amount of transfer corresponding to each token IDdata
- Additional data with no specified format.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
safeBatchTransferFrom
public TransactionReceipt.TransactionReceiptData safeBatchTransferFrom(java.lang.String from, java.lang.String to, java.math.BigInteger[] tokenIds, java.math.BigInteger[] amounts, java.lang.String data, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Batch-operation version ofsafeTransferFrom(String, String, BigInteger, BigInteger, String, SendOptions)
.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String from = "0x{fromAddress}"; String to = "0x{toAddress}"; BigInteger[] tokenIds = new BigInteger[]{....}; BigInteger[] amounts = new BigInteger[]{....}; String data = "data"; TransactionReceipt.TransactionReceiptData receipt = kip37.safeTransferFrom(from, to, tokenId, amounts, data, sendOptions);
- Parameters:
from
- Source address.to
- Target address.tokenIds
- IDs of token type(integer)amounts
- The amount of transfer corresponding to each token IDdata
- Additional data with no specified format.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
setApprovalForAll
public TransactionReceipt.TransactionReceiptData setApprovalForAll(java.lang.String operator, boolean approved) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String operator = "0x{operatorAddress}"; boolean approved = true; TransactionReceipt.TransactionReceiptData receipt = kip37.setApprovalForAll(operator, approved);
- Parameters:
operator
- The address to add to the set of authorized operators.approved
- True if the operator is approved, false to revoke approval- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
setApprovalForAll
public TransactionReceipt.TransactionReceiptData setApprovalForAll(java.lang.String operator, boolean approved, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String operator = "0x{operatorAddress}"; boolean approved = true; TransactionReceipt.TransactionReceiptData receipt = kip37.setApprovalForAll(operator, approved, sendOptions);
- Parameters:
operator
- The address to add to the set of authorized operators.approved
- True if the operator is approved, false to revoke approvalsendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
isApprovedForAll
public boolean isApprovedForAll(java.lang.String owner, java.lang.String operator) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Get the approval status of an operator for a given owner.Example :
String owner = "0x{ownerAddress}"; String operator = "0x{operatorAddress}"; boolean isApproved = kip37.isApprovedForALl(owner, operator);
- Parameters:
owner
- The address of the token owner.operator
- The address of the authorized operator.- Returns:
- boolean
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
totalSupply
public java.math.BigInteger totalSupply(java.lang.String tokenId) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Get the total supply of the token type requested.Example :
String tokenId = "0x1"; BigInteger supply = kip37.totalSupply(tokenId);
- Parameters:
tokenId
- The ID of the token.(hex string)- Returns:
- BigInteger
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
totalSupply
public java.math.BigInteger totalSupply(java.math.BigInteger tokenId) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Get the total supply of the token type requested.Example :
BigInteger tokenId = BigInteger.ONE; BigInteger supply = kip37.totalSupply(tokenId);
- Parameters:
tokenId
- The ID of the token.(integer)- Returns:
- BigInteger
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
create
public TransactionReceipt.TransactionReceiptData create(java.lang.String tokenId, java.math.BigInteger initialSupply) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Creates a new token type and assigns initialSupply to the minter.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String tokenId = "0x1"; BigInteger initialSupply = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.create(tokenId, initialSupply);
- Parameters:
tokenId
- The token id to create.(hex string)initialSupply
- The amount of tokens being minted.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
create
public TransactionReceipt.TransactionReceiptData create(java.math.BigInteger tokenId, java.math.BigInteger initialSupply) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Creates a new token type and assigns initialSupply to the minter.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); BigInteger tokenId = BigInteger.ONE; BigInteger initialSupply = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.create(tokenId, initialSupply);
- Parameters:
tokenId
- The token id to create.(integer)initialSupply
- The amount of tokens being minted.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
create
public TransactionReceipt.TransactionReceiptData create(java.lang.String tokenId, java.math.BigInteger initialSupply, java.lang.String uri) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Creates a new token type and assigns initialSupply to the minter.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String tokenId = "0x1"; BigInteger initialSupply = BigInteger.ONE; String uri = "uri"; TransactionReceipt.TransactionReceiptData receipt = kip37.create(tokenId, initialSupply, uri);
- Parameters:
tokenId
- The token id to create.(hex string)initialSupply
- The amount of tokens being minted.uri
- The token URI of the created token.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
create
public TransactionReceipt.TransactionReceiptData create(java.math.BigInteger tokenId, java.math.BigInteger initialSupply, java.lang.String uri) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Creates a new token type and assigns initialSupply to the minter.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); BigInteger tokenId = BigInteger.ONE; BigInteger initialSupply = BigInteger.ONE; String uri = "uri"; TransactionReceipt.TransactionReceiptData receipt = kip37.create(tokenId, initialSupply, uri);
- Parameters:
tokenId
- The token id to create.(integer)initialSupply
- The amount of tokens being minted.uri
- The token URI of the created token.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
create
public TransactionReceipt.TransactionReceiptData create(java.lang.String tokenId, java.math.BigInteger initialSupply, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Creates a new token type and assigns initialSupply to the minter.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String tokenId = "0x1"; BigInteger initialSupply = BigInteger.ONE; String uri = "uri"; TransactionReceipt.TransactionReceiptData receipt = kip37.create(tokenId, initialSupply, uri, sendOptions);
- Parameters:
tokenId
- The token id to create.(hex string)initialSupply
- The amount of tokens being minted.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
create
public TransactionReceipt.TransactionReceiptData create(java.math.BigInteger tokenId, java.math.BigInteger initialSupply, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Creates a new token type and assigns initialSupply to the minter.Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); BigInteger tokenId = BigInteger.ONE; BigInteger initialSupply = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.create(tokenId, initialSupply, uri, sendOptions);
- Parameters:
tokenId
- The token id to create.(integer)initialSupply
- The amount of tokens being minted.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
create
public TransactionReceipt.TransactionReceiptData create(java.lang.String tokenId, java.math.BigInteger initialSupply, java.lang.String uri, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Creates a new token type and assigns initialSupply to the minter.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String tokenId = "0x1"; BigInteger initialSupply = BigInteger.ONE; String uri = "uri"; TransactionReceipt.TransactionReceiptData receipt = kip37.create(tokenId, initialSupply, uri, sendOptions);
- Parameters:
tokenId
- The token id to create.(hex string)initialSupply
- The amount of tokens being minted.uri
- The token URI of the created token.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
create
public TransactionReceipt.TransactionReceiptData create(java.math.BigInteger tokenId, java.math.BigInteger initialSupply, java.lang.String uri, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Creates a new token type and assigns initialSupply to the minter.Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); BigInteger tokenId = BigInteger.ONE; BigInteger initialSupply = BigInteger.ONE; String uri = "uri"; TransactionReceipt.TransactionReceiptData receipt = kip37.create(tokenId, initialSupply, uri, sendOptions);
- Parameters:
tokenId
- The token id to create.(integer)initialSupply
- The amount of tokens being minted.uri
- The token URI of the created token.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
mint
public TransactionReceipt.TransactionReceiptData mint(java.lang.String to, java.lang.String tokenId, java.math.BigInteger value) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Mints token of the specific token type.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String to = "0x{toAddress}"; String tokenId = "0x1"; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.mint(to, tokenId, value);
- Parameters:
to
- The address that will receive the minted tokens.tokenId
- The token id to mint.(hex string)value
- The quantity of tokens being minted.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
mint
public TransactionReceipt.TransactionReceiptData mint(java.lang.String to, java.math.BigInteger tokenId, java.math.BigInteger value) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Mints token of the specific token type.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String to = "0x{toAddress}"; BigInteger tokenId = BigInteger.ONE; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.mint(to, tokenId, value);
- Parameters:
to
- The address that will receive the minted tokens.tokenId
- The token id to mint.(integer)value
- The quantity of tokens being minted.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
mint
public TransactionReceipt.TransactionReceiptData mint(java.lang.String to, java.lang.String tokenId, java.math.BigInteger value, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Mints token of the specific token type.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String to = "0x{toAddress}"; String tokenId = "0x1"; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.mint(to, tokenId, value, sendOptions);
- Parameters:
to
- The address that will receive the minted tokens.tokenId
- The token id to mint.(hex string)value
- The quantity of tokens being minted.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
mint
public TransactionReceipt.TransactionReceiptData mint(java.lang.String to, java.math.BigInteger tokenId, java.math.BigInteger value, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Mints token of the specific token type.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String to = "0x{toAddress}"; BigInteger tokenId = BigInteger.ONE; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.mint(to, tokenId, value, sendOptions);
- Parameters:
to
- The address that will receive the minted tokens.tokenId
- The token id to mint.(integer)value
- The quantity of tokens being minted.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
mint
public TransactionReceipt.TransactionReceiptData mint(java.lang.String[] toList, java.lang.String tokenId, java.math.BigInteger[] values) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Mints tokens of the specific token type.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String[] toList = new String[]{...}; String tokenId = "0x1"; BigInteger value = new BigInteger[]{...} TransactionReceipt.TransactionReceiptData receipt = kip37.mint(to, tokenId, value);
- Parameters:
toList
- The list of addresses that will receive the minted tokens.tokenId
- The token id to mint.(hex string)values
- The list of quantities of tokens being minted.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
mint
public TransactionReceipt.TransactionReceiptData mint(java.lang.String[] toList, java.math.BigInteger tokenId, java.math.BigInteger[] values) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Mints tokens of the specific token type.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String[] toList = new String[]{...}; BigInteger tokenId = BigInteger.ONE; BigInteger value = new BigInteger[]{...} TransactionReceipt.TransactionReceiptData receipt = kip37.mint(to, tokenId, value);
- Parameters:
toList
- The list of addresses that will receive the minted tokens.tokenId
- The token id to mint.(integer)values
- The list of quantities of tokens being minted.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
mint
public TransactionReceipt.TransactionReceiptData mint(java.lang.String[] toList, java.lang.String tokenId, java.math.BigInteger[] values, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Mints tokens of the specific token type.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String to = "0x{toAddress}"; BigInteger tokenId = BigInteger.ONE; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.mint(to, tokenId, value);
- Parameters:
toList
- The list of addresses that will receive the minted tokens.tokenId
- The token id to mint.(hex string)values
- The list of quantities of tokens being minted.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
mint
public TransactionReceipt.TransactionReceiptData mint(java.lang.String[] toList, java.math.BigInteger tokenId, java.math.BigInteger[] values, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Mints tokens of the specific token type.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String to = "0x{toAddress}"; BigInteger tokenId = BigInteger.ONE; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.mint(to, tokenId, value, sendOptions);
- Parameters:
toList
- The list of addresses that will receive the minted tokens.tokenId
- The token id to mint.(integer)values
- The list of quantities of tokens being minted.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
mintBatch
public TransactionReceipt.TransactionReceiptData mintBatch(java.lang.String to, java.lang.String[] tokenIds, java.math.BigInteger[] values) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Mints multiple KIP-37 tokens of the specific token types. It will use default sendOptions in contract instance to passed sendOptions If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String to = "0x{toAddress}"; String[] tokenIds = new String[]{...} BigInteger[] values = new BigInteger[]{...} TransactionReceipt.TransactionReceiptData receipt = kip37.mint(to, tokenIds, values);
- Parameters:
to
- The address that will receive the minted tokens.tokenIds
- The list of the token ids to mint.(hex string)values
- The list of quantities of token being minted.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
mintBatch
public TransactionReceipt.TransactionReceiptData mintBatch(java.lang.String to, java.math.BigInteger[] tokenIds, java.math.BigInteger[] values) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Mints multiple KIP-37 tokens of the specific token types. It will use default sendOptions in contract instance to passed sendOptions If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String to = "0x{toAddress}"; BigInteger[] tokenIds = new BigInteger[]{...} BigInteger[] values = new BigInteger[]{...} TransactionReceipt.TransactionReceiptData receipt = kip37.mint(to, tokenIds, values);
- Parameters:
to
- The address that will receive the minted tokens.tokenIds
- The list of the token ids to mint.(integer)values
- The list of quantities of token being minted.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
mintBatch
public TransactionReceipt.TransactionReceiptData mintBatch(java.lang.String to, java.lang.String[] tokenIds, java.math.BigInteger[] values, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Mints multiple KIP-37 tokens of the specific token types.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String to = "0x{toAddress}"; String[] tokenIds = new String[]{...} BigInteger[] values = new BigInteger[]{...} TransactionReceipt.TransactionReceiptData receipt = kip37.mint(to, tokenIds, values, sendOptions);
- Parameters:
to
- The address that will receive the minted tokens.tokenIds
- The list of the token ids to mint.(hex string)values
- The list of quantities of token being minted.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
mintBatch
public TransactionReceipt.TransactionReceiptData mintBatch(java.lang.String to, java.math.BigInteger[] tokenIds, java.math.BigInteger[] values, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Mints multiple KIP-37 tokens of the specific token types.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String to = "0x{toAddress}"; BigInteger[] tokenIds = new BigInteger[]{...} BigInteger[] values = new BigInteger[]{...} TransactionReceipt.TransactionReceiptData receipt = kip37.mint(to, tokenIds, values, sendOptions);
- Parameters:
to
- The address that will receive the minted tokens.tokenIds
- The list of the token ids to mint.(integer)values
- The list of quantities of token being minted.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
isMinter
public boolean isMinter(java.lang.String account) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Checks if specific account has the Minter role.Example :
String account = "0x{accountAddress}"; boolean hasMinter = kip37.isMinter(account);
- Parameters:
account
- The address to check that has Minter role- Returns:
- boolean
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
addMinter
public TransactionReceipt.TransactionReceiptData addMinter(java.lang.String account) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Adds an account as a minter that has the permission of MinterRole and can mint.It will use default sendOptions in contract instance to passed sendOptions
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String account = "0x{accountAddress}"; TransactionReceipt.TransactionReceiptData receipt = kip37.addMinter(account);
- Parameters:
account
- The account address to add minter role.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
addMinter
public TransactionReceipt.TransactionReceiptData addMinter(java.lang.String account, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Adds an account as a minter that has the permission of MinterRole and can mint.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String account = "0x{address}"; TransactionReceipt.TransactionReceiptData receipt = kip37.addMinter(account, sendOptions);
- Parameters:
account
- The account address to add minter role.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
renounceMinter
public TransactionReceipt.TransactionReceiptData renounceMinter() throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Renounces privilege of MinterRole from an account.It will use default sendOptions in contract instance to passed sendOptions
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); TransactionReceipt.TransactionReceiptData receipt = kip37.renounceMinter();
- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
renounceMinter
public TransactionReceipt.TransactionReceiptData renounceMinter(SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Renounces privilege of MinterRole from an account.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); TransactionReceipt.TransactionReceiptData receipt = kip37.renounceMinter(sendOptions);
- Parameters:
sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
burn
public TransactionReceipt.TransactionReceiptData burn(java.lang.String address, java.lang.String tokenId, java.math.BigInteger value) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Burns a token.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String owner = "0x{ownerAddress}"; String tokenId = "0x1"; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.burn(owner, tokenId, value);
- Parameters:
address
- The account that owns tokens.tokenId
- The token id to burn.(hex string)value
- The token amount to burn.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
burn
public TransactionReceipt.TransactionReceiptData burn(java.lang.String address, java.math.BigInteger tokenId, java.math.BigInteger value) throws java.lang.NoSuchMethodException, org.web3j.protocol.exceptions.TransactionException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Burns a token.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String owner = "0x{toAddress}"; BigInteger tokenId = BigInteger.ONE; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.burn(owner, tokenId, value);
- Parameters:
address
- The account that owns tokens.tokenId
- The token id to burn.(integer)value
- The token amount to burn.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
burn
public TransactionReceipt.TransactionReceiptData burn(java.lang.String address, java.lang.String tokenId, java.math.BigInteger value, SendOptions sendParam) throws java.lang.NoSuchMethodException, org.web3j.protocol.exceptions.TransactionException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Burns a token.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String owner = "0x{toAddress}"; String tokenId = "0x1"; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.burn(owner, tokenId, value, sendOptions);
- Parameters:
address
- The account that owns tokens.tokenId
- The token id to burn.(hex string)value
- The token amount to burn.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
org.web3j.protocol.exceptions.TransactionException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
burn
public TransactionReceipt.TransactionReceiptData burn(java.lang.String address, java.math.BigInteger tokenId, java.math.BigInteger value, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Burns a token.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String owner = "0x{toAddress}"; BigInteger tokenId = BigInteger.ONE; BigInteger value = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.burn(owner, tokenId, value, sendOptions);
- Parameters:
address
- The account that owns tokens.tokenId
- The token id to burn.(integer)value
- The token amount to burn.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
org.web3j.protocol.exceptions.TransactionException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
burnBatch
public TransactionReceipt.TransactionReceiptData burnBatch(java.lang.String address, java.lang.String[] tokenIds, java.math.BigInteger[] values) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Burns multiple KIP37 tokens.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String owner = "0x{ownerAddress}"; String[] tokenIds = new String[]{...} BigInteger[] values = new BigInteger[]{...}; TransactionReceipt.TransactionReceiptData receipt = kip37.burnBatch(owner, tokenIds, values);
- Parameters:
address
- The account that owns tokens.tokenIds
- The list of the token ids to burn.(hex string)values
- The list of the token amounts to burn.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
burnBatch
public TransactionReceipt.TransactionReceiptData burnBatch(java.lang.String address, java.math.BigInteger[] tokenIds, java.math.BigInteger[] values) throws java.lang.NoSuchMethodException, org.web3j.protocol.exceptions.TransactionException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Burns multiple KIP37 tokens.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String owner = "0x{ownerAddress}"; BigInteger[] tokenIds = new BigInteger[]{...} BigInteger[] values = new BigInteger[]{...}; TransactionReceipt.TransactionReceiptData receipt = kip37.burnBatch(owner, tokenIds, values);
- Parameters:
address
- The account that owns tokens.tokenIds
- The list of the token ids to burn.(integer)values
- The list of the token amounts to burn.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
burnBatch
public TransactionReceipt.TransactionReceiptData burnBatch(java.lang.String address, java.lang.String[] tokenIds, java.math.BigInteger[] values, SendOptions sendParam) throws java.lang.NoSuchMethodException, org.web3j.protocol.exceptions.TransactionException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Burns multiple KIP37 tokens.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String owner = "0x{ownerAddress}"; String[] tokenIds = new String[]{...} BigInteger[] values = new BigInteger[]{...}; TransactionReceipt.TransactionReceiptData receipt = kip37.burnBatch(owner, tokenIds, values, sendOptions);
- Parameters:
address
- The account that owns tokens.tokenIds
- The list of the token ids to burn.(hex string)values
- The list of the token amounts to burn.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
burnBatch
public TransactionReceipt.TransactionReceiptData burnBatch(java.lang.String address, java.math.BigInteger[] tokenIds, java.math.BigInteger[] values, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Burns multiple KIP37 tokens.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String owner = "0x{ownerAddress}"; BigInteger[] tokenIds = new BigInteger[]{...} BigInteger[] values = new BigInteger[]{...}; TransactionReceipt.TransactionReceiptData receipt = kip37.burnBatch(owner, tokenIds, values, sendOptions);
- Parameters:
address
- The account that owns tokens.tokenIds
- The list of the token ids to burn.(integer)values
- The list of the token amounts to burn.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
paused
public boolean paused() throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Check if contract has been paused state.Example :
boolean isPausedContract = kip37.paused();
- Returns:
- boolean
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
paused
public boolean paused(java.lang.String tokenId) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Check if token has been paused state.Example :
String tokenId = "0x1"; boolean isPausedContract = kip37.paused(tokenId);
- Parameters:
tokenId
- The token ID.(hex string)- Returns:
- boolean
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
paused
public boolean paused(java.math.BigInteger tokenId) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Check if token has been paused state.Example :
BigInteger tokenId = BigInteger.ONE; boolean isPausedContract = kip37.paused(tokenId);
- Parameters:
tokenId
- The token ID.(integer)- Returns:
- boolean
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
pause
public TransactionReceipt.TransactionReceiptData pause() throws java.lang.NoSuchMethodException, org.web3j.protocol.exceptions.TransactionException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Pause a contract.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); TransactionReceipt.TransactionReceiptData receipt = kip37.pause();
- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
org.web3j.protocol.exceptions.TransactionException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
pause
public TransactionReceipt.TransactionReceiptData pause(SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Pause a contract.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); TransactionReceipt.TransactionReceiptData receipt = kip37.pause(sendOptions);
- Parameters:
sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
unpause
public TransactionReceipt.TransactionReceiptData unpause() throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Unpauses a contract.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); TransactionReceipt.TransactionReceiptData receipt = kip37.unpause();
- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
unpause
public TransactionReceipt.TransactionReceiptData unpause(SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Unpauses a contract.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); TransactionReceipt.TransactionReceiptData receipt = kip37.unpause(sendOptions);
- Parameters:
sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
pause
public TransactionReceipt.TransactionReceiptData pause(java.lang.String tokenId) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Pauses a specific token.It will use default sendOptions in contract instance to passed sendOptions
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String tokenId = "0x1"; TransactionReceipt.TransactionReceiptData receipt = kip37.pause(tokenId);
- Parameters:
tokenId
- The token id to pause(hex string)- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
pause
public TransactionReceipt.TransactionReceiptData pause(java.math.BigInteger tokenId) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Pauses a specific token.It will use default sendOptions in contract instance to passed sendOptions
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); BigInteger tokenId = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.pause(tokenId);
- Parameters:
tokenId
- The token id to pause(integer)- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
pause
public TransactionReceipt.TransactionReceiptData pause(java.lang.String tokenId, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Pauses a specific token.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String tokenId = "0x1"; TransactionReceipt.TransactionReceiptData receipt = kip37.pause(tokenId, sendOptions);
- Parameters:
tokenId
- The token id to pause(hex string)sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
pause
public TransactionReceipt.TransactionReceiptData pause(java.math.BigInteger tokenId, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Pauses a specific token.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); BigInteger tokenId = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.pause(tokenId, sendOptions);
- Parameters:
tokenId
- The token id to pause(integer)sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
unpause
public TransactionReceipt.TransactionReceiptData unpause(java.lang.String tokenId) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Unpauses a specific token.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String tokenId = "0x1"; TransactionReceipt.TransactionReceiptData receipt = kip37.unpause(tokenId);
- Parameters:
tokenId
- he token id to unpause(hex string)- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
unpause
public TransactionReceipt.TransactionReceiptData unpause(java.math.BigInteger tokenId) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Unpauses a specific token.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); BigInteger tokenId = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.unpause(tokenId);
- Parameters:
tokenId
- he token id to unpause(integer)- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
unpause
public TransactionReceipt.TransactionReceiptData unpause(java.lang.String tokenId, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Unpauses a specific token.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String tokenId = "0x1"; TransactionReceipt.TransactionReceiptData receipt = kip37.unpause(tokenId, sendOptions);
- Parameters:
tokenId
- he token id to unpause(hex string)sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
unpause
public TransactionReceipt.TransactionReceiptData unpause(java.math.BigInteger tokenId, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, org.web3j.protocol.exceptions.TransactionException
Unpauses a specific token.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); BigInteger tokenId = BigInteger.ONE; TransactionReceipt.TransactionReceiptData receipt = kip37.unpause(tokenId, sendOptions);
- Parameters:
tokenId
- he token id to unpause(integer)sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
org.web3j.protocol.exceptions.TransactionException
-
isPauser
public boolean isPauser(java.lang.String account) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Checks if specific account has Pauser role.- Parameters:
account
- The account address to check that has Pauser role.Example :
String account = "0x{accountAddress}"; boolean isPauser = kip37.isPauser(account);
- Returns:
- boolean
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
addPauser
public TransactionReceipt.TransactionReceiptData addPauser(java.lang.String account) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Adds an account as a pauser that has the permission of PauserRole and can pause.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); String account = "0x{accountAddress}"; TransactionReceipt.TransactionReceiptData receipt = kip37.addPauser(account);
- Parameters:
account
- The account address to add Pauser role.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
addPauser
public TransactionReceipt.TransactionReceiptData addPauser(java.lang.String account, SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Adds an account as a pauser that has the permission of PauserRole and can pause.If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); String account = "0x{accountAddress}"; TransactionReceipt.TransactionReceiptData receipt = kip37.addPauser(account, sendOptions);
- Parameters:
account
- The account address to add Pauser role.sendParam
- A SendOptions need to execute contract's method.- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
renouncePauser
public TransactionReceipt.TransactionReceiptData renouncePauser() throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Renounces privilege of PauserRole from an account.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); kip37.setDefaultSendOptions(sendOptions); TransactionReceipt.TransactionReceiptData receipt = kip37.renouncePauser();
- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
renouncePauser
public TransactionReceipt.TransactionReceiptData renouncePauser(SendOptions sendParam) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, org.web3j.protocol.exceptions.TransactionException
Renounces privilege of PauserRole from an account.It will use default sendOptions in contract instance to passed sendOptions.
If a gas value in sendOptions has null, it will automatically set gas value through estimateGas().
Example :
String sender = "0x{senderAddress}"; SendOptions sendOptions = new SendOptions(); sendOptions.setFrom(sender); TransactionReceipt.TransactionReceiptData receipt = kip37.renouncePauser(sendOptions);
- Returns:
- TransactionReceipt.TransactionReceiptData
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
org.web3j.protocol.exceptions.TransactionException
-
supportsInterface
public boolean supportsInterface(java.lang.String interfaceId) throws java.lang.NoSuchMethodException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
Call method "supportsInterface" in KIP-13 standard contract.Example :
boolean isSupported = kip37.supportInterface(KIP37.INTERFACE.IKIP37.getId());
- Parameters:
interfaceId
- interface identifier. seeKIP37.INTERFACE
- Returns:
- boolean
- Throws:
java.lang.NoSuchMethodException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
-
-