Search in sources :

Example 1 with IExternalStateForPrecompiled

use of org.aion.precompiled.type.IExternalStateForPrecompiled in project aion by aionnetwork.

the class BridgeControllerOwnerTest method beforeEach.

@Before
public void beforeEach() {
    IExternalStateForPrecompiled worldState = ExternalStateForTests.usingDefaultRepository();
    this.connector = new BridgeStorageConnector(worldState, CONTRACT_ADDR);
    PrecompiledTransactionContext context = dummyContext();
    this.logs = context.getLogs();
    this.controller = new BridgeController(connector, this.logs, CONTRACT_ADDR, OWNER_ADDR);
}
Also used : IExternalStateForPrecompiled(org.aion.precompiled.type.IExternalStateForPrecompiled) PrecompiledTransactionContext(org.aion.precompiled.type.PrecompiledTransactionContext) BridgeStorageConnector(org.aion.precompiled.contracts.ATB.BridgeStorageConnector) BridgeController(org.aion.precompiled.contracts.ATB.BridgeController) Before(org.junit.Before)

Example 2 with IExternalStateForPrecompiled

use of org.aion.precompiled.type.IExternalStateForPrecompiled in project aion by aionnetwork.

the class BridgeRingInitializationTest method beforeEach.

@Before
public void beforeEach() {
    IExternalStateForPrecompiled worldState = ExternalStateForTests.usingDefaultRepository();
    this.connector = new BridgeStorageConnector(worldState, CONTRACT_ADDR);
    this.controller = new BridgeController(connector, dummyContext().getLogs(), CONTRACT_ADDR, OWNER_ADDR);
    this.controller.initialize();
}
Also used : IExternalStateForPrecompiled(org.aion.precompiled.type.IExternalStateForPrecompiled) BridgeStorageConnector(org.aion.precompiled.contracts.ATB.BridgeStorageConnector) BridgeController(org.aion.precompiled.contracts.ATB.BridgeController) Before(org.junit.Before)

Example 3 with IExternalStateForPrecompiled

use of org.aion.precompiled.type.IExternalStateForPrecompiled in project aion by aionnetwork.

the class BridgeStorageConnectorTest method beforeEach.

@Before
public void beforeEach() {
    IExternalStateForPrecompiled worldState = ExternalStateForTests.usingDefaultRepository();
    this.connector = new BridgeStorageConnector(worldState, contractAddress);
}
Also used : IExternalStateForPrecompiled(org.aion.precompiled.type.IExternalStateForPrecompiled) Before(org.junit.Before)

Example 4 with IExternalStateForPrecompiled

use of org.aion.precompiled.type.IExternalStateForPrecompiled in project aion by aionnetwork.

the class BridgeStorageConnectorTest method beforeEach.

@Before
public void beforeEach() {
    IExternalStateForPrecompiled worldState = ExternalStateForTests.usingDefaultRepository();
    this.connector = new BridgeStorageConnector(worldState, contractAddress);
}
Also used : IExternalStateForPrecompiled(org.aion.precompiled.type.IExternalStateForPrecompiled) BridgeStorageConnector(org.aion.precompiled.contracts.ATB.BridgeStorageConnector) Before(org.junit.Before)

Example 5 with IExternalStateForPrecompiled

use of org.aion.precompiled.type.IExternalStateForPrecompiled in project aion by aionnetwork.

the class BridgeControllerRingTest method beforeEach.

@Before
public void beforeEach() {
    IExternalStateForPrecompiled worldState = ExternalStateForTests.usingDefaultRepository();
    this.connector = new BridgeStorageConnector(worldState, CONTRACT_ADDR);
    this.controller = new BridgeController(connector, dummyContext().getLogs(), CONTRACT_ADDR, OWNER_ADDR);
    this.controller.initialize();
    byte[][] memberList = new byte[members.length][];
    for (int i = 0; i < members.length; i++) {
        memberList[i] = members[i].getAddress();
    }
    // setup initial ring structure
    this.controller.ringInitialize(OWNER_ADDR.toByteArray(), memberList);
}
Also used : IExternalStateForPrecompiled(org.aion.precompiled.type.IExternalStateForPrecompiled) BridgeStorageConnector(org.aion.precompiled.contracts.ATB.BridgeStorageConnector) BridgeController(org.aion.precompiled.contracts.ATB.BridgeController) Before(org.junit.Before)

Aggregations

IExternalStateForPrecompiled (org.aion.precompiled.type.IExternalStateForPrecompiled)10 Before (org.junit.Before)8 BridgeStorageConnector (org.aion.precompiled.contracts.ATB.BridgeStorageConnector)4 BridgeController (org.aion.precompiled.contracts.ATB.BridgeController)3 PrecompiledTransactionContext (org.aion.precompiled.type.PrecompiledTransactionContext)3 ArrayList (java.util.ArrayList)1 AionTransaction (org.aion.base.AionTransaction)1 AionTxExecSummary (org.aion.base.AionTxExecSummary)1 RepositoryCache (org.aion.base.db.RepositoryCache)1 PrecompiledTransactionResult (org.aion.precompiled.PrecompiledTransactionResult)1 PrecompiledWrappedTransactionResult (org.aion.precompiled.type.PrecompiledWrappedTransactionResult)1 AionAddress (org.aion.types.AionAddress)1 TransactionResult (org.aion.types.TransactionResult)1 TransactionStatus (org.aion.types.TransactionStatus)1 CfgFork (org.aion.zero.impl.config.CfgFork)1 ExternalCapabilitiesForPrecompiled (org.aion.zero.impl.vm.precompiled.ExternalCapabilitiesForPrecompiled)1 ExternalStateForPrecompiled (org.aion.zero.impl.vm.precompiled.ExternalStateForPrecompiled)1