Search in sources :

Example 1 with TokensConstraintScrypt

use of com.radixdlt.application.tokens.TokensConstraintScrypt in project radixdlt by radixdlt.

the class CMTokensTest method setup.

@Before
public void setup() {
    // Build the engine based on the constraint machine configured by the AtomOS
    CMAtomOS cmAtomOS = new CMAtomOS();
    cmAtomOS.load(new TokensConstraintScrypt());
    this.cm = new ConstraintMachine.Builder().setParticleStaticCheck(cmAtomOS.buildParticleStaticCheck()).setParticleTransitionProcedures(cmAtomOS.buildTransitionProcedures()).build();
    RadixAddress tokenAddress = new RadixAddress((byte) 0, ECKeyPair.generateNew().getPublicKey());
    this.token = RRI.of(tokenAddress, "TEST");
    this.granularity = UInt256.ONE;
    this.permissions = ImmutableMap.of(TokenTransition.BURN, TokenPermission.TOKEN_OWNER_ONLY, TokenTransition.MINT, TokenPermission.TOKEN_OWNER_ONLY);
}
Also used : TokensConstraintScrypt(com.radixdlt.application.tokens.TokensConstraintScrypt) RadixAddress(com.radixdlt.identifiers.RadixAddress) CMAtomOS(com.radixdlt.atomos.CMAtomOS) Before(org.junit.Before)

Aggregations

TokensConstraintScrypt (com.radixdlt.application.tokens.TokensConstraintScrypt)1 CMAtomOS (com.radixdlt.atomos.CMAtomOS)1 RadixAddress (com.radixdlt.identifiers.RadixAddress)1 Before (org.junit.Before)1