All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.org.sol4k.BaseInstruction.kt Maven / Gradle / Ivy

There is a newer version: 0.5.4
Show newest version
package org.sol4k

data class BaseInstruction(
    override val data: ByteArray,
    override val keys: List,
    override val programId: PublicKey,
) : Instruction {
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as BaseInstruction

        if (!data.contentEquals(other.data)) return false
        if (keys != other.keys) return false
        if (programId != other.programId) return false

        return true
    }

    override fun hashCode(): Int {
        var result = data.contentHashCode()
        result = 31 * result + keys.hashCode()
        result = 31 * result + programId.hashCode()
        return result
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy