Skip to content

Commit

Permalink
optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
trueinsider committed Aug 14, 2018
1 parent 0ad1dc2 commit f50d788
Show file tree
Hide file tree
Showing 95 changed files with 182 additions and 347 deletions.
3 changes: 0 additions & 3 deletions src/META-INF/MANIFEST.MF

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/java/META-INF/MANIFEST.MF

This file was deleted.

6 changes: 1 addition & 5 deletions src/main/java/com/github/neo/core/NeoRpc.kt
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
package com.github.neo.core

import com.alibaba.fastjson.JSON
import com.github.neo.core.NeoRpc.call
import com.github.ontio.common.ErrorCode
import com.github.ontio.network.exception.RpcException

import java.io.IOException
import java.io.InputStreamReader
import java.io.OutputStreamWriter
import java.net.HttpURLConnection
import java.net.URL
import java.util.HashMap
import java.util.*

object NeoRpc {

Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/github/neo/core/Program.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import com.github.ontio.io.Serializable

import java.io.IOException

/**
*
*/
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/com/github/neo/core/SmartContract.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ package com.github.neo.core

import com.alibaba.fastjson.JSON
import com.github.neo.core.transaction.InvocationTransaction
import com.github.neo.core.transaction.PublishTransaction
import com.github.ontio.common.Fixed8
import com.github.ontio.common.Helper
import com.github.ontio.core.scripts.ScriptBuilder
import com.github.neo.core.transaction.PublishTransaction
import com.github.ontio.smartcontract.neovm.abi.AbiFunction

import java.math.BigInteger
import java.util.ArrayList
import java.util.UUID
import java.util.*

/**
*
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/github/neo/core/TransactionAttribute.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ package com.github.neo.core
import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import com.github.ontio.io.Serializable

import java.io.IOException
import java.util.Arrays
import java.util.*

/**
*
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/github/neo/core/TransactionInput.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import com.github.ontio.io.Serializable

import java.io.IOException

/**
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import com.github.ontio.core.transaction.TransactionType
import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter


import java.io.IOException

class InvocationTransaction(
version: Byte,
attributes: Array<TransactionAttribute>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ import com.github.ontio.common.Address
import com.github.ontio.core.transaction.TransactionType
import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter

import java.io.IOException
import java.util.ArrayList
import java.util.Arrays
import java.util.*

class PublishTransaction(
version: Byte,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ package com.github.neo.core.transaction


import com.github.neo.core.Program
import com.github.neo.core.TransactionAttribute
import com.github.neo.core.TransactionInput
import com.github.neo.core.TransactionOutput
import com.github.ontio.account.Account
import com.github.ontio.core.Inventory
import com.github.ontio.core.InventoryType
import com.github.ontio.core.transaction.TransactionType
import com.github.ontio.crypto.SignatureScheme
import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import com.github.neo.core.TransactionAttribute
import com.github.neo.core.TransactionOutput

import java.io.ByteArrayInputStream
import java.io.IOException
import java.util.*
Expand Down
16 changes: 5 additions & 11 deletions src/main/java/com/github/ontio/OntSdk.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,20 @@

package com.github.ontio

import com.github.ontio.OntSdk.defaultSignScheme
import com.github.ontio.OntSdk.rpc
import com.github.ontio.OntSdk.walletMgr
import com.github.ontio.account.Account
import com.github.ontio.common.Common
import com.github.ontio.common.ErrorCode
import com.github.ontio.core.DataSignature
import com.github.ontio.core.asset.Sig
import com.github.ontio.core.program.Program
import com.github.ontio.core.transaction.Transaction
import com.github.ontio.core.asset.Sig
import com.github.ontio.crypto.Digest
import com.github.ontio.crypto.SignatureScheme
import com.github.ontio.sdk.exception.SDKException
import com.github.ontio.sdk.manager.*
import com.github.ontio.smartcontract.NativeVm
import com.github.ontio.smartcontract.NeoVm
import com.github.ontio.smartcontract.Vm
import com.github.ontio.smartcontract.WasmVm

import java.util.Arrays
import com.github.ontio.sdk.manager.ConnectMgr
import com.github.ontio.sdk.manager.SignServer
import com.github.ontio.sdk.manager.WalletMgr
import java.util.*

/**
* Ont Sdk
Expand Down
18 changes: 7 additions & 11 deletions src/main/java/com/github/ontio/account/Account.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@

package com.github.ontio.account

import com.github.ontio.common.Address
import com.github.ontio.common.ErrorCode
import com.github.ontio.crypto.*
import com.github.ontio.common.Helper
import com.github.ontio.common.Address
import com.github.ontio.crypto.Base58
import com.github.ontio.crypto.*
import com.github.ontio.crypto.Signature
import com.github.ontio.crypto.Digest
import com.github.ontio.sdk.exception.SDKException
import org.bouncycastle.crypto.generators.SCrypt
import org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey
Expand All @@ -36,18 +34,16 @@ import org.bouncycastle.jce.ECPointUtil
import org.bouncycastle.jce.provider.BouncyCastleProvider
import org.bouncycastle.jce.spec.ECNamedCurveSpec
import org.bouncycastle.util.Strings

import javax.crypto.Cipher
import javax.crypto.spec.GCMParameterSpec
import javax.crypto.spec.IvParameterSpec
import javax.crypto.spec.SecretKeySpec
import java.io.ByteArrayOutputStream
import java.math.BigInteger
import java.nio.charset.StandardCharsets
import java.security.*
import java.security.spec.*
import java.util.Arrays
import java.util.Base64
import java.util.*
import javax.crypto.Cipher
import javax.crypto.spec.GCMParameterSpec
import javax.crypto.spec.IvParameterSpec
import javax.crypto.spec.SecretKeySpec
import kotlin.experimental.xor

class Account {
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/github/ontio/common/Common.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
package com.github.ontio.common

import com.github.ontio.crypto.ECC

import java.text.SimpleDateFormat
import java.util.Date
import java.util.*

abstract class Common : AutoCloseable {
companion object {
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/com/github/ontio/common/Fixed8.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@

package com.github.ontio.common

import java.io.IOException
import java.math.BigDecimal
import java.util.function.Function

import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import com.github.ontio.io.Serializable
import java.math.BigDecimal

/**
*
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/github/ontio/common/Helper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ package com.github.ontio.common

import java.math.BigInteger
import java.text.SimpleDateFormat
import java.util.Arrays
import java.util.Date
import java.util.*
import kotlin.experimental.inv

/**
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/com/github/ontio/common/UIntBase.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@

package com.github.ontio.common

import java.io.IOException
import java.nio.*
import java.util.Arrays

import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import com.github.ontio.io.Serializable
import java.nio.ByteBuffer
import java.nio.ByteOrder
import java.util.*

/**
* Custom type base abstract class, it defines the storage and the serialization
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/com/github/ontio/common/WalletQR.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ package com.github.ontio.common
import com.alibaba.fastjson.JSON
import com.github.ontio.account.Account.Companion.getGcmDecodedPrivateKey
import com.github.ontio.crypto.SignatureScheme
import com.github.ontio.sdk.wallet.*

import java.util.Base64
import com.github.ontio.sdk.wallet.Account
import com.github.ontio.sdk.wallet.Identity
import com.github.ontio.sdk.wallet.Scrypt
import com.github.ontio.sdk.wallet.Wallet
import java.util.*

object WalletQR {
fun exportIdentityQRCode(walletFile: Wallet, identity: Identity): Map<*, *> {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/github/ontio/core/DataSignature.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import com.github.ontio.crypto.SignatureScheme
import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter

import java.io.IOException

class DataSignature : Signable {
private lateinit var scheme: SignatureScheme
private lateinit var account: Account
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/com/github/ontio/core/Signable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@

package com.github.ontio.core

import java.io.ByteArrayOutputStream
import java.io.IOException
import com.github.ontio.account.Account
import com.github.ontio.common.Address
import com.github.ontio.crypto.Digest
import com.github.ontio.crypto.SignatureScheme
import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import com.github.ontio.io.Serializable

import com.github.ontio.common.Address
import java.io.ByteArrayOutputStream
import java.io.IOException

interface Signable : Serializable {
val addressU160ForVerifying: Array<Address>?
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/com/github/ontio/core/asset/Contract.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
package com.github.ontio.core.asset

import com.github.ontio.common.Address
import com.github.ontio.crypto.Digest
import com.github.ontio.io.*

import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import com.github.ontio.io.Serializable
import java.io.ByteArrayInputStream
import java.io.IOException
import java.util.HashMap

/**
*
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/com/github/ontio/core/asset/Sig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ package com.github.ontio.core.asset

import com.github.ontio.common.Helper
import com.github.ontio.core.program.Program
import com.github.ontio.io.*

import java.io.IOException
import java.util.*

import com.github.ontio.core.program.Program.ProgramFromMultiPubKey
import com.github.ontio.core.program.Program.ProgramFromParams
import com.github.ontio.core.program.Program.ProgramFromPubKey
import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import com.github.ontio.io.Serializable
import java.util.*

/**
*
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/github/ontio/core/asset/State.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ package com.github.ontio.core.asset

import com.github.ontio.common.Address
import com.github.ontio.common.Helper
import com.github.ontio.crypto.Digest
import com.github.ontio.io.*

import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import com.github.ontio.io.Serializable
import java.io.ByteArrayInputStream
import java.io.IOException
import java.math.BigInteger
import java.util.HashMap
import java.util.*

/**
*
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/github/ontio/core/asset/TransferFrom.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import com.github.ontio.common.Address
import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import com.github.ontio.io.Serializable

import java.io.IOException
import java.util.HashMap
import java.util.*

/**
*
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/github/ontio/core/asset/Transfers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

package com.github.ontio.core.asset

import com.github.ontio.io.*

import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import com.github.ontio.io.Serializable
import java.io.ByteArrayInputStream
import java.io.IOException
import java.util.ArrayList
import java.util.HashMap
import java.util.*

/**
*
Expand Down
13 changes: 7 additions & 6 deletions src/main/java/com/github/ontio/core/block/Block.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,19 @@

package com.github.ontio.core.block

import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.IOException
import java.util.function.Function

import com.alibaba.fastjson.JSON
import com.github.ontio.common.*
import com.github.ontio.common.Address
import com.github.ontio.common.Helper
import com.github.ontio.common.UInt256
import com.github.ontio.core.Inventory
import com.github.ontio.core.InventoryType
import com.github.ontio.core.transaction.Transaction
import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.IOException
import java.util.function.Function

/**
* block
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/github/ontio/core/globalparams/Params.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import com.github.ontio.common.Helper
import com.github.ontio.io.BinaryReader
import com.github.ontio.io.BinaryWriter
import com.github.ontio.io.Serializable

import java.io.IOException
import java.math.BigInteger

class Params(var params: Array<Param>) : Serializable {
Expand Down
Loading

0 comments on commit f50d788

Please sign in to comment.