Skip to content

Commit

Permalink
add DNA copyright header
Browse files Browse the repository at this point in the history
  • Loading branch information
Honglei-Cong committed Nov 28, 2019
1 parent ef07d66 commit 1c83e82
Show file tree
Hide file tree
Showing 353 changed files with 1,359 additions and 1,391 deletions.
44 changes: 22 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GOFMT=gofmt
GC=go build
VERSION := $(shell git describe --always --tags --long)
BUILD_NODE_PAR = -ldflags "-X github.com/ontio/ontology/common/config.Version=$(VERSION)" #-race
BUILD_NODE_PAR = -ldflags "-X github.com/DNAProject/DNA/common/config.Version=$(VERSION)" #-race

ARCH=$(shell uname -m)
DBUILD=docker build
Expand All @@ -14,8 +14,8 @@ TOOLS=./tools
ABI=$(TOOLS)/abi
NATIVE_ABI_SCRIPT=./cmd/abi/native_abi_script

ontology: $(SRC_FILES)
$(GC) $(BUILD_NODE_PAR) -o ontology main.go
DNA: $(SRC_FILES)
$(GC) $(BUILD_NODE_PAR) -o DNA main.go

sigsvr: $(SRC_FILES) abi
$(GC) $(BUILD_NODE_PAR) -o sigsvr sigsvr.go
Expand All @@ -28,18 +28,18 @@ abi:

tools: sigsvr abi

all: ontology tools
all: DNA tools

ontology-cross: ontology-windows ontology-linux ontology-darwin
DNA-cross: DNA-windows DNA-linux DNA-darwin

ontology-windows:
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GC) $(BUILD_NODE_PAR) -o ontology-windows-amd64.exe main.go
DNA-windows:
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GC) $(BUILD_NODE_PAR) -o DNA-windows-amd64.exe main.go

ontology-linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GC) $(BUILD_NODE_PAR) -o ontology-linux-amd64 main.go
DNA-linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GC) $(BUILD_NODE_PAR) -o DNA-linux-amd64 main.go

ontology-darwin:
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GC) $(BUILD_NODE_PAR) -o ontology-darwin-amd64 main.go
DNA-darwin:
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GC) $(BUILD_NODE_PAR) -o DNA-darwin-amd64 main.go

tools-cross: tools-windows tools-linux tools-darwin

Expand All @@ -58,37 +58,37 @@ tools-darwin: abi
@if [ ! -d $(TOOLS) ];then mkdir -p $(TOOLS) ;fi
@mv sigsvr-darwin-amd64 $(TOOLS)

all-cross: ontology-cross tools-cross abi
all-cross: DNA-cross tools-cross abi

format:
$(GOFMT) -w main.go

docker/payload: docker/build/bin/ontology docker/Dockerfile
@echo "Building ontology payload"
docker/payload: docker/build/bin/DNA docker/Dockerfile
@echo "Building DNA payload"
@mkdir -p $@
@cp docker/Dockerfile $@
@cp docker/build/bin/ontology $@
@cp docker/build/bin/DNA $@
@touch $@

docker/build/bin/%: Makefile
@echo "Building ontology in docker"
@echo "Building DNA in docker"
@mkdir -p docker/build/bin docker/build/pkg
@$(DRUN) --rm \
-v $(abspath docker/build/bin):/go/bin \
-v $(abspath docker/build/pkg):/go/pkg \
-v $(GOPATH)/src:/go/src \
-w /go/src/github.com/ontio/ontology \
-w /go/src/github.com/DNAProject/DNA \
golang:1.9.5-stretch \
$(GC) $(BUILD_NODE_PAR) -o docker/build/bin/ontology main.go
$(GC) $(BUILD_NODE_PAR) -o docker/build/bin/DNA main.go
@touch $@

docker: Makefile docker/payload docker/Dockerfile
@echo "Building ontology docker"
@$(DBUILD) -t $(DOCKER_NS)/ontology docker/payload
@docker tag $(DOCKER_NS)/ontology $(DOCKER_NS)/ontology:$(DOCKER_TAG)
@echo "Building DNA docker"
@$(DBUILD) -t $(DOCKER_NS)/DNA docker/payload
@docker tag $(DOCKER_NS)/DNA $(DOCKER_NS)/DNA:$(DOCKER_TAG)
@touch $@

clean:
rm -rf *.8 *.o *.out *.6 *exe coverage
rm -rf ontology ontology-* tools docker/payload docker/build
rm -rf DNA DNA-* tools docker/payload docker/build

6 changes: 3 additions & 3 deletions account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ package account
import (
"github.com/ontio/ontology-crypto/keypair"
s "github.com/ontio/ontology-crypto/signature"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/log"
"github.com/ontio/ontology/core/types"
"github.com/DNAProject/DNA/common"
"github.com/DNAProject/DNA/common/log"
"github.com/DNAProject/DNA/core/types"
)

/* crypto object */
Expand Down
2 changes: 1 addition & 1 deletion account/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
package account

import (
"github.com/ontio/ontology/core/types"
"github.com/DNAProject/DNA/core/types"
"github.com/stretchr/testify/assert"
"os"
"testing"
Expand Down
4 changes: 2 additions & 2 deletions account/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (

"github.com/ontio/ontology-crypto/keypair"
s "github.com/ontio/ontology-crypto/signature"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/core/types"
"github.com/DNAProject/DNA/common"
"github.com/DNAProject/DNA/core/types"
)

//Client of wallet
Expand Down
2 changes: 1 addition & 1 deletion account/file_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"os"

"github.com/ontio/ontology-crypto/keypair"
"github.com/ontio/ontology/common"
"github.com/DNAProject/DNA/common"
)

/** AccountData - for wallet read and save, no crypto object included **/
Expand Down
2 changes: 1 addition & 1 deletion account/file_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"

"github.com/ontio/ontology-crypto/keypair"
"github.com/ontio/ontology/core/types"
"github.com/DNAProject/DNA/core/types"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion account/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (

base58 "github.com/itchyny/base58-go"
"github.com/ontio/ontology-crypto/keypair"
"github.com/ontio/ontology/core/types"
"github.com/DNAProject/DNA/core/types"
"golang.org/x/crypto/ripemd160"
)

Expand Down
2 changes: 1 addition & 1 deletion account/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
package account

import (
"github.com/ontio/ontology/common"
"github.com/DNAProject/DNA/common"
)

type ClientStore interface {
Expand Down
2 changes: 1 addition & 1 deletion cmd/abi/abi_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package abi
import (
"encoding/json"
"fmt"
"github.com/ontio/ontology/common/log"
"github.com/DNAProject/DNA/common/log"
"io/ioutil"
"strings"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"fmt"
"github.com/ontio/ontology-crypto/keypair"
s "github.com/ontio/ontology-crypto/signature"
"github.com/ontio/ontology/cmd/common"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common/config"
"github.com/DNAProject/DNA/cmd/common"
"github.com/DNAProject/DNA/cmd/utils"
"github.com/DNAProject/DNA/common/config"
"github.com/urfave/cli"
"strings"
)
Expand Down
10 changes: 5 additions & 5 deletions cmd/account_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (
"fmt"
"github.com/ontio/ontology-crypto/keypair"
"github.com/ontio/ontology-crypto/signature"
"github.com/ontio/ontology/account"
"github.com/ontio/ontology/cmd/common"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common/password"
"github.com/ontio/ontology/core/types"
"github.com/DNAProject/DNA/account"
"github.com/DNAProject/DNA/cmd/common"
"github.com/DNAProject/DNA/cmd/utils"
"github.com/DNAProject/DNA/common/password"
"github.com/DNAProject/DNA/core/types"
"github.com/urfave/cli"
"os"
)
Expand Down
10 changes: 5 additions & 5 deletions cmd/asset_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ package cmd

import (
"fmt"
"github.com/ontio/ontology/account"
cmdcom "github.com/ontio/ontology/cmd/common"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common/config"
nutils "github.com/ontio/ontology/smartcontract/service/native/utils"
"github.com/DNAProject/DNA/account"
cmdcom "github.com/DNAProject/DNA/cmd/common"
"github.com/DNAProject/DNA/cmd/utils"
"github.com/DNAProject/DNA/common/config"
nutils "github.com/DNAProject/DNA/smartcontract/service/native/utils"
"github.com/urfave/cli"
"strconv"
"strings"
Expand Down
10 changes: 5 additions & 5 deletions cmd/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ package common

import (
"fmt"
"github.com/ontio/ontology/account"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/config"
"github.com/ontio/ontology/common/password"
"github.com/DNAProject/DNA/account"
"github.com/DNAProject/DNA/cmd/utils"
"github.com/DNAProject/DNA/common"
"github.com/DNAProject/DNA/common/config"
"github.com/DNAProject/DNA/common/password"
"github.com/urfave/cli"
"strconv"
)
Expand Down
10 changes: 5 additions & 5 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ package cmd

import (
"fmt"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/config"
"github.com/ontio/ontology/common/log"
"github.com/ontio/ontology/smartcontract/service/native/governance"
"github.com/DNAProject/DNA/cmd/utils"
"github.com/DNAProject/DNA/common"
"github.com/DNAProject/DNA/common/config"
"github.com/DNAProject/DNA/common/log"
"github.com/DNAProject/DNA/smartcontract/service/native/governance"
"github.com/urfave/cli"
)

Expand Down
14 changes: 7 additions & 7 deletions cmd/contract_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ package cmd
import (
"encoding/json"
"fmt"
cmdcom "github.com/ontio/ontology/cmd/common"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/config"
"github.com/ontio/ontology/core/payload"
httpcom "github.com/ontio/ontology/http/base/common"
"github.com/ontio/ontology/smartcontract/states"
cmdcom "github.com/DNAProject/DNA/cmd/common"
"github.com/DNAProject/DNA/cmd/utils"
"github.com/DNAProject/DNA/common"
"github.com/DNAProject/DNA/common/config"
"github.com/DNAProject/DNA/core/payload"
httpcom "github.com/DNAProject/DNA/http/base/common"
"github.com/DNAProject/DNA/smartcontract/states"
"github.com/urfave/cli"
"io/ioutil"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions cmd/export_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"bufio"
"fmt"
"github.com/gosuri/uiprogress"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common/serialization"
"github.com/DNAProject/DNA/cmd/utils"
"github.com/DNAProject/DNA/common/serialization"
"github.com/urfave/cli"
"os"
"time"
Expand Down
14 changes: 7 additions & 7 deletions cmd/import_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ import (
"os"

"github.com/gosuri/uiprogress"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common/config"
"github.com/ontio/ontology/common/log"
"github.com/ontio/ontology/common/serialization"
"github.com/ontio/ontology/core/genesis"
"github.com/ontio/ontology/core/ledger"
"github.com/ontio/ontology/core/types"
"github.com/DNAProject/DNA/cmd/utils"
"github.com/DNAProject/DNA/common/config"
"github.com/DNAProject/DNA/common/log"
"github.com/DNAProject/DNA/common/serialization"
"github.com/DNAProject/DNA/core/genesis"
"github.com/DNAProject/DNA/core/ledger"
"github.com/DNAProject/DNA/core/types"
"github.com/urfave/cli"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/info_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ package cmd
import (
"encoding/hex"
"fmt"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/core/types"
httpcom "github.com/ontio/ontology/http/base/common"
"github.com/DNAProject/DNA/cmd/utils"
"github.com/DNAProject/DNA/core/types"
httpcom "github.com/DNAProject/DNA/http/base/common"
"github.com/urfave/cli"
"strconv"
)
Expand Down
10 changes: 5 additions & 5 deletions cmd/sig_tx_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
"encoding/hex"
"fmt"
"github.com/ontio/ontology-crypto/keypair"
cmdcom "github.com/ontio/ontology/cmd/common"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/constants"
"github.com/ontio/ontology/core/types"
cmdcom "github.com/DNAProject/DNA/cmd/common"
"github.com/DNAProject/DNA/cmd/utils"
"github.com/DNAProject/DNA/common"
"github.com/DNAProject/DNA/common/constants"
"github.com/DNAProject/DNA/core/types"
"github.com/urfave/cli"
"strings"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/sigsvr/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ package common
import (
"encoding/json"
"fmt"
"github.com/ontio/ontology/account"
"github.com/ontio/ontology/cmd/sigsvr/store"
"github.com/DNAProject/DNA/account"
"github.com/DNAProject/DNA/cmd/sigsvr/store"
)

var DefWalletStore *store.WalletStore
Expand Down
2 changes: 1 addition & 1 deletion cmd/sigsvr/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

package sigsvr

import "github.com/ontio/ontology/cmd/sigsvr/handlers"
import "github.com/DNAProject/DNA/cmd/sigsvr/handlers"

func init() {
DefCliRpcSvr.RegHandler("createaccount", handlers.CreateAccount)
Expand Down
4 changes: 2 additions & 2 deletions cmd/sigsvr/handlers/create_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"encoding/json"
"github.com/ontio/ontology-crypto/keypair"
s "github.com/ontio/ontology-crypto/signature"
clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common"
"github.com/ontio/ontology/common/log"
clisvrcom "github.com/DNAProject/DNA/cmd/sigsvr/common"
"github.com/DNAProject/DNA/common/log"
)

type CreateAccountReq struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/sigsvr/handlers/create_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
package handlers

import (
clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common"
clisvrcom "github.com/DNAProject/DNA/cmd/sigsvr/common"
"testing"
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/sigsvr/handlers/export_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ package handlers
import (
"encoding/json"
"fmt"
"github.com/ontio/ontology/account"
clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/log"
"github.com/DNAProject/DNA/account"
clisvrcom "github.com/DNAProject/DNA/cmd/sigsvr/common"
"github.com/DNAProject/DNA/common"
"github.com/DNAProject/DNA/common/log"
"io/ioutil"
"strings"
"time"
Expand Down
Loading

0 comments on commit 1c83e82

Please sign in to comment.