You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the beginning we can use Ganache to run the tests.
This would mean we would use ethereum rpc interface, so we obviously aren't able to test integration with a substrate runtime, but we can do some basic tests to make sure that the main contract logic works as expected
Eventually we will want to have tests that use the substrate api to intract with the contracts and be also able to verify if the intreactions between substrate runtime and evm work as expected. At this point we can decide whether we should maintain two separate sets of tests (unit and integration) and whether unit tests should rely on eth-compatible rpc interface or use the substrate api.
Bridge contracts
For initial tests we will use some predefined key that will act as a "runtime key".
We will also need to preserve some state of bridge contracts in order to be able to succesfully perform other tests (channels, videos, curator groups etc.), as they will rely on bridge contracts state to validate sender permissions.
Initialization
Batch insert
success case (verify storage changed as expected)
access denied case (wrong key)
override case (verify batch insert does not override existing data)
Finish initialization
access denied case
already finished case
success case (verify batchInsert can no longer be used)
Hooks
Memberships - addMemberControllerAddress
success case (verify storage changed accordingly)
access denied case (wrong key)
member address already set case (check if event is emitted)
Memberships - updateMemberControllerAddress
success case (verify storage changed accordingly)
access denied case (wrong key)
member address not set case (check if event is emitted)
ContentWorkingGroup - setLeadAddress
success case (verify storage changed accordingly)
access denied case (wrong key)
address already set case (check if event is emitted)
At the beginning we can use Ganache to run the tests.
This would mean we would use ethereum rpc interface, so we obviously aren't able to test integration with a substrate runtime, but we can do some basic tests to make sure that the main contract logic works as expected
Eventually we will want to have tests that use the substrate api to intract with the contracts and be also able to verify if the intreactions between substrate runtime and evm work as expected. At this point we can decide whether we should maintain two separate sets of tests (unit and integration) and whether unit tests should rely on eth-compatible rpc interface or use the substrate api.
Bridge contracts
For initial tests we will use some predefined key that will act as a "runtime key".
We will also need to preserve some state of bridge contracts in order to be able to succesfully perform other tests (channels, videos, curator groups etc.), as they will rely on bridge contracts state to validate sender permissions.
Initialization
Batch insert
Finish initialization
batchInsert
can no longer be used)Hooks
Memberships - addMemberControllerAddress
Memberships - updateMemberControllerAddress
ContentWorkingGroup - setLeadAddress
ContentWorkingGroup - updateLeadAddress, removeLeadAddress
ContentWorkingGroup - addCuratorAddress
ContentWorkingGroup - updateCuratorAddress, removeCuratorAddress
ContentWorkingGroup - disableLead
ContentWorkingGroup - enableLead
The text was updated successfully, but these errors were encountered: