Skip to content

Commit

Permalink
Merge branch '3.x' into feature/delegation-signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
marc0olo authored Jul 7, 2021
2 parents 4e5bee5 + cb8f570 commit 4895c94
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@

/**
* aeternity supports multiple virtual machines. depending on the selected VM contract related
* transactions need to specify the respective abiVersion and vmVersion
* transactions need to specify the respective abiVersion and vmVersion.
*
* <p>since protocol version 5 (Iris) new contracts can only be created using the FATE VM, see
* https://github.com/aeternity/protocol/blob/master/contracts/contract_vms.md#virtual-machines-on-the-%C3%A6ternity-blockchain
*
* <p>it's still valid to use AEVM for contract calls of old contracts and as developer you can
* always define a custom vmVersion to use for contract related transactions for the respective VM
*/
@AllArgsConstructor
public enum VirtualMachine {
Expand All @@ -29,9 +35,4 @@ public VirtualMachine withVmVersion(BigInteger vmVersion) {
this.vmVersion = vmVersion;
return this;
}

public VirtualMachine withAbiVersion(BigInteger abiVersion) {
this.abiVersion = abiVersion;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.kryptokrauts.aeternity.generated.model.GenericTx;
import com.kryptokrauts.aeternity.sdk.annotations.Mandatory;
import com.kryptokrauts.aeternity.sdk.constants.VirtualMachine;
import com.kryptokrauts.aeternity.sdk.exception.InvalidParameterException;
import com.kryptokrauts.aeternity.sdk.service.transaction.type.AbstractTransaction;
import com.kryptokrauts.aeternity.sdk.service.transaction.type.impl.ContractCreateTransaction;
import com.kryptokrauts.sophia.compiler.generated.api.rxjava.DefaultApi;
Expand Down Expand Up @@ -72,8 +73,10 @@ public Function<GenericTx, ContractCreateTransactionModel> getApiToModelFunction

@Override
public void validateInput() {
// TODO Auto-generated method stub

if (!VirtualMachine.FATE.equals(this.virtualMachine)) {
throw new InvalidParameterException(
"AEVM cannot be used for the creation of contracts anymore.");
}
}

@Override
Expand Down

0 comments on commit 4895c94

Please sign in to comment.