public final class UpdateContract extends Payload
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
static UpdateContract |
from(@NonNull CCDAmount amount,
@NonNull ContractAddress contractAddress,
@NonNull ReceiveName receiveName,
@NonNull Parameter param)
Creates a
UpdateContract from the given parameters. |
static UpdateContract |
from(CCDAmount amount,
@NonNull ContractAddress contractAddress,
SchemaParameter schemaParameter)
Creates a
UpdateContract from the given parameters. |
static UpdateContract |
from(@NonNull ContractAddress contractAddress,
SchemaParameter schemaParameter)
Creates a
UpdateContract with amount = 0 from the given parameters. |
static UpdateContract |
from(long amount,
@NonNull ContractAddress contractAddress,
@NonNull String contractName,
@NonNull String method,
byte[] parameter)
> This function creates a payload for updating a contract
|
static Payload |
fromBytes(ByteBuffer source) |
CCDAmount |
getAmount()
Send the given amount of CCD to the smart contract.
|
ContractAddress |
getContractAddress()
Address of the contract instance to invoke.
|
Parameter |
getParam()
Message to send to the contract instance
|
byte[] |
getRawPayloadBytes()
This must return the raw payload i.e., the
payload only.
|
ReceiveName |
getReceiveName()
Name of the method to invoke on the contract.
|
TransactionType |
getTransactionType() |
int |
hashCode() |
String |
toString() |
calculateEnergyCost, getBytespublic static UpdateContract from(long amount, @NonNull @NonNull ContractAddress contractAddress, @NonNull @NonNull String contractName, @NonNull @NonNull String method, byte[] parameter)
amount - The amount of CCD to be sent to the contract.contractAddress - Address of the contract instance to invoke.contractName - Name of the contract to update.method - Name of the method to invoke on the contractparameter - The parameter of the contract method.public static UpdateContract from(@NonNull @NonNull CCDAmount amount, @NonNull @NonNull ContractAddress contractAddress, @NonNull @NonNull ReceiveName receiveName, @NonNull @NonNull Parameter param)
UpdateContract from the given parameters.amount - The amount of CCD to be sent to the contract.contractAddress - Address of the contract instance to invoke.receiveName - The ReceiveName of the smart contract instance to invoke.param - The parameter of the contract method.public static UpdateContract from(@NonNull @NonNull ContractAddress contractAddress, SchemaParameter schemaParameter)
UpdateContract with amount = 0 from the given parameters.contractAddress - Address of the contract instance to invoke.schemaParameter - SchemaParameter message to invoke the contract with. Must be initialized with SchemaParameter.initialize() beforehand.public static UpdateContract from(CCDAmount amount, @NonNull @NonNull ContractAddress contractAddress, SchemaParameter schemaParameter)
UpdateContract from the given parameters.amount - The amount of CCD to be sent to the contract.contractAddress - Address of the contract instance to invoke.schemaParameter - SchemaParameter message to invoke the contract with. Must be initialized with SchemaParameter.initialize() beforehand.public TransactionType getTransactionType()
getTransactionType in class Payloadpublic byte[] getRawPayloadBytes()
PayloadPayload.getBytes()getRawPayloadBytes in class Payloadpublic static Payload fromBytes(ByteBuffer source)
public CCDAmount getAmount()
public ContractAddress getContractAddress()
public ReceiveName getReceiveName()
public Parameter getParam()
protected boolean canEqual(Object other)
Copyright © 2025. All rights reserved.