FollowerContract
, NSmartContract
, SlotContract
, UnsContract
public interface NContract
Used to implement node-side smart contract functionality (e.g. slot contract and other incoming types)
Modifier and Type | Method | Description |
---|---|---|
boolean |
beforeCreate(ImmutableEnvironment e) |
Check the smart contract could be created
|
boolean |
beforeRevoke(ImmutableEnvironment e) |
Check the smart contract could be revoked
|
boolean |
beforeUpdate(ImmutableEnvironment e) |
Check the smart contract could be updated (e.g.
|
@NonNull java.lang.String |
getExtendedType() |
This is a string tag which is used to find the proper
NContract
implementation. |
default void |
onContractSubscriptionEvent(ContractSubscription.Event event) |
For the
ContractSubscription the instance will receive event notifications with this callback |
@Nullable net.sergeych.tools.Binder |
onCreated(MutableEnvironment me) |
Called after the new contract is approved by the network.
|
void |
onRevoked(ImmutableEnvironment me) |
Called when the contract is just revoked by the network
|
@Nullable net.sergeych.tools.Binder |
onUpdated(MutableEnvironment me) |
Called after the new contract revision is approved by the network.
|
@NonNull net.sergeych.tools.Binder |
query(ImmutableEnvironment e,
java.lang.String methodName,
net.sergeych.tools.Binder params) |
Call the readonly method (query) that does not change the contract inner state (neither the contract nor
any associated data) and return the result
|
@NonNull java.lang.String getExtendedType()
NContract
implementation.boolean beforeCreate(ImmutableEnvironment e)
boolean beforeUpdate(ImmutableEnvironment e)
boolean beforeRevoke(ImmutableEnvironment e)
@Nullable net.sergeych.tools.Binder onCreated(MutableEnvironment me)
@Nullable net.sergeych.tools.Binder onUpdated(MutableEnvironment me)
void onRevoked(ImmutableEnvironment me)
@NonNull net.sergeych.tools.Binder query(ImmutableEnvironment e, java.lang.String methodName, net.sergeych.tools.Binder params)
methodName
- params
- or nulldefault void onContractSubscriptionEvent(ContractSubscription.Event event)
ContractSubscription
the instance will receive event notifications with this callbackevent
-