use of com.radixdlt.store.InMemoryEngineStore in project radixdlt by radixdlt.
the class BurnTokensV3Test method setup.
@Before
public void setup() throws Exception {
var cmAtomOS = new CMAtomOS();
cmAtomOS.load(new SystemConstraintScrypt());
cmAtomOS.load(new TokensConstraintScryptV3(Set.of(), Pattern.compile("[a-z0-9]+")));
var cm = new ConstraintMachine(cmAtomOS.getProcedures(), cmAtomOS.buildSubstateDeserialization(), cmAtomOS.buildVirtualSubstateDeserialization());
var parser = new REParser(cmAtomOS.buildSubstateDeserialization());
var serialization = cmAtomOS.buildSubstateSerialization();
EngineStore<Void> store = new InMemoryEngineStore<>();
this.engine = new RadixEngine<>(parser, serialization, REConstructor.newBuilder().put(CreateSystem.class, new CreateSystemConstructorV2()).put(CreateMutableToken.class, new CreateMutableTokenConstructor(SystemConstraintScrypt.MAX_SYMBOL_LENGTH)).put(MintToken.class, new MintTokenConstructor()).put(BurnToken.class, new BurnTokenConstructor()).build(), cm, store);
var genesis = this.engine.construct(new CreateSystem(0)).buildWithoutSignature();
this.engine.execute(List.of(genesis), null, PermissionLevel.SYSTEM);
}
Aggregations