-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coordinator: fix integration test smart contract deploy helper (#197)
coordinator: fix integration test smart contract deploy helper
- Loading branch information
Showing
2 changed files
with
77 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...ls/src/test/kotlin/net/consensys/zkevm/ethereum/MakefileContractDeploymentHelperKtTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package net.consensys.zkevm.ethereum | ||
|
||
import org.assertj.core.api.Assertions.assertThat | ||
import org.junit.jupiter.api.Test | ||
|
||
class MakefileContractDeploymentHelperKtTest { | ||
|
||
@Test | ||
fun getDeployedAddress_messageService() { | ||
assertThat( | ||
getDeployedAddress( | ||
listOf( | ||
"L2MessageService artifact has been deployed in 1.2659626659999998s ", | ||
"L2MessageService deployed: address=0xFE48d65B84AA0E23594Fd585c11cAD831F90AcB6 blockNumber=8", | ||
"" | ||
), | ||
l2MessageServiceAddressPattern | ||
) | ||
).isEqualTo( | ||
DeployedContract("0xFE48d65B84AA0E23594Fd585c11cAD831F90AcB6", 8) | ||
) | ||
|
||
assertThat( | ||
getDeployedAddress( | ||
listOf( | ||
"L2MessageServiceV1.2.3 artifact has been deployed in 1.2659626659999998s ", | ||
"L2MessageServiceV1.2.3 deployed: address=0xFE48d65B84AA0E23594Fd585c11cAD831F90AcB6 blockNumber=8", | ||
"" | ||
), | ||
l2MessageServiceAddressPattern | ||
) | ||
).isEqualTo( | ||
DeployedContract("0xFE48d65B84AA0E23594Fd585c11cAD831F90AcB6", 8) | ||
) | ||
} | ||
|
||
@Test | ||
fun getDeployedAddress_LineaRollup() { | ||
assertThat( | ||
getDeployedAddress( | ||
listOf( | ||
"LineaRollup artifact has been deployed in 1.855172125s ", | ||
"LineaRollup deployed: address=0x8613180dF1485B8b87DEE3BCf31896659eb1a092 blockNumber=1414", | ||
"" | ||
), | ||
lineaRollupAddressPattern | ||
) | ||
).isEqualTo( | ||
DeployedContract("0x8613180dF1485B8b87DEE3BCf31896659eb1a092", 1414) | ||
) | ||
|
||
assertThat( | ||
getDeployedAddress( | ||
listOf( | ||
"LineaRollupV5.2.1 artifact has been deployed in 1.855172125s ", | ||
"LineaRollupV5.2.1 deployed: address=0x8613180dF1485B8b87DEE3BCf31896659eb1a092 blockNumber=1414", | ||
"" | ||
), | ||
lineaRollupAddressPattern | ||
) | ||
).isEqualTo( | ||
DeployedContract("0x8613180dF1485B8b87DEE3BCf31896659eb1a092", 1414) | ||
) | ||
} | ||
} |