This repository has been archived by the owner on Jan 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from cybercongress/148_internal_operations
148 internal operations [pump]
- Loading branch information
Showing
51 changed files
with
2,153 additions
and
325 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
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
21 changes: 21 additions & 0 deletions
21
cassandra-service/src/main/kotlin/fund/cyber/cassandra/ethereum/configuration/Converters.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,21 @@ | ||
package fund.cyber.cassandra.ethereum.configuration | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper | ||
import fund.cyber.search.model.ethereum.TxTrace | ||
import org.springframework.core.convert.converter.Converter | ||
|
||
/** | ||
* Used to create TxTrace from byted json. | ||
*/ | ||
class TxTraceReadConverter(private val jsonDeserializer: ObjectMapper) : Converter<ByteArray, TxTrace> { | ||
|
||
override fun convert(source: ByteArray) = jsonDeserializer.readValue(source, TxTrace::class.java)!! | ||
} | ||
|
||
/** | ||
* Used to convert TxTrace to byted json. | ||
*/ | ||
class TxTraceWriteConverter(private val jsonSerializer: ObjectMapper) : Converter<TxTrace, ByteArray> { | ||
|
||
override fun convert(source: TxTrace) = jsonSerializer.writeValueAsBytes(source)!! | ||
} |
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
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
21 changes: 21 additions & 0 deletions
21
cassandra-service/src/main/kotlin/fund/cyber/cassandra/ethereum/model/Operation.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,21 @@ | ||
package fund.cyber.cassandra.ethereum.model | ||
|
||
import fund.cyber.search.model.ethereum.OperationType | ||
import java.math.BigDecimal | ||
import java.time.Instant | ||
|
||
/** | ||
* Represent operations, moving eth, for contract. | ||
*/ | ||
data class CqlEthereumContractOperation( | ||
val txHash: String, | ||
val txTime: Instant, | ||
val contract: String, | ||
val type: OperationType, | ||
val from: String, | ||
val to: String, | ||
val value: BigDecimal, | ||
val error: String?, //not null if operation execution failed | ||
val gasUsed: Long, | ||
val gasLimit: Long | ||
) |
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
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
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
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
Oops, something went wrong.