Search in sources :

Example 1 with BridgeStorageConnector

use of org.aion.precompiled.contracts.ATB.BridgeStorageConnector 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 BridgeStorageConnector

use of org.aion.precompiled.contracts.ATB.BridgeStorageConnector 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 BridgeStorageConnector

use of org.aion.precompiled.contracts.ATB.BridgeStorageConnector 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 4 with BridgeStorageConnector

use of org.aion.precompiled.contracts.ATB.BridgeStorageConnector 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

BridgeStorageConnector (org.aion.precompiled.contracts.ATB.BridgeStorageConnector)4 IExternalStateForPrecompiled (org.aion.precompiled.type.IExternalStateForPrecompiled)4 Before (org.junit.Before)4 BridgeController (org.aion.precompiled.contracts.ATB.BridgeController)3 PrecompiledTransactionContext (org.aion.precompiled.type.PrecompiledTransactionContext)1