Commit 7e705ce3 authored by vipwzw's avatar vipwzw

auto ci

parent ddbe3a60
...@@ -821,25 +821,25 @@ function configbridgevmxgoAddr() { ...@@ -821,25 +821,25 @@ function configbridgevmxgoAddr() {
function TestETH2EVMToChain33() { function TestETH2EVMToChain33() {
# 查询 ETH 这端 bridgeBank 地址原来是 0 # 查询 ETH 这端 bridgeBank 地址原来是 0
result=$(${CLIA} ethereum balance -o "${ethBridgeBank}") result=$(${CLIA} ethereum balance -o "${ethBridgeBank}")
# cli_ret "${result}" "balance" ".balance" "16" # cli_ret "${result}" "balance" ".balance" "16"
# ETH 这端 lock 11个 # ETH 这端 lock 11个
result=$(${CLIA} ethereum lock -m 11 -k "${ethTestAddrKey1}" -r "${chain33ReceiverAddr}") result=$(${CLIA} ethereum lock -m 11 -k "${ethTestAddrKey1}" -r "${chain33ReceiverAddr}")
# cli_ret "${result}" "lock" # cli_ret "${result}" "lock"
# eth 等待 2 个区块 # eth 等待 2 个区块
sleep 4 sleep 4
# 查询 ETH 这端 bridgeBank 地址 11 原来16 # 查询 ETH 这端 bridgeBank 地址 11 原来16
result=$(${CLIA} ethereum balance -o "${ethBridgeBank}") result=$(${CLIA} ethereum balance -o "${ethBridgeBank}")
# cli_ret "${result}" "balance" ".balance" "27" # cli_ret "${result}" "balance" ".balance" "27"
sleep ${maturityDegree} sleep ${maturityDegree}
# chain33 chain33EthBridgeTokenAddr(ETH合约中)查询 lock 金额 # chain33 chain33EthBridgeTokenAddr(ETH合约中)查询 lock 金额
result=$(${Chain33Cli} evm query -a "${chain33EthBridgeTokenAddr}" -c "${chain33DeployAddr}" -b "balanceOf(${chain33ReceiverAddr})") result=$(${Chain33Cli} evm query -a "${chain33EthBridgeTokenAddr}" -c "${chain33DeployAddr}" -b "balanceOf(${chain33ReceiverAddr})")
# 结果是 11 * le8 # 结果是 11 * le8
# is_equal "${result}" "4700000000" # is_equal "${result}" "4700000000"
updateConfig "ETH" "${chain33EthBridgeTokenAddr}" updateConfig "ETH" "${chain33EthBridgeTokenAddr}"
configbridgevmxgoAddr "${XgoChain33BridgeBank}" configbridgevmxgoAddr "${XgoChain33BridgeBank}"
...@@ -851,16 +851,16 @@ function TestETH2EVMToChain33() { ...@@ -851,16 +851,16 @@ function TestETH2EVMToChain33() {
check_tx "${Chain33Cli}" "${hash}" check_tx "${Chain33Cli}" "${hash}"
result=$(${Chain33Cli} evm query -a "${chain33EthBridgeTokenAddr}" -c "${chain33DeployAddr}" -b "balanceOf(${chain33ReceiverAddr})") result=$(${Chain33Cli} evm query -a "${chain33EthBridgeTokenAddr}" -c "${chain33DeployAddr}" -b "balanceOf(${chain33ReceiverAddr})")
# is_equal "${result}" "4200000000" # is_equal "${result}" "4200000000"
result=$(${Chain33Cli} evm query -a "${chain33EthBridgeTokenAddr}" -c "${chain33DeployAddr}" -b "balanceOf(${XgoChain33BridgeBank})") result=$(${Chain33Cli} evm query -a "${chain33EthBridgeTokenAddr}" -c "${chain33DeployAddr}" -b "balanceOf(${XgoChain33BridgeBank})")
# is_equal "${result}" "500000000" # is_equal "${result}" "500000000"
} }
function Testethereum2EVMToChain33_byc() { function Testethereum2EVMToChain33_byc() {
# 查询 ETH 这端 bridgeBank 地址原来是 # 查询 ETH 这端 bridgeBank 地址原来是
result=$(${CLIA} ethereum balance -o "${ethBridgeBank}" -t "${ethereumBycERC20TokenAddr}") result=$(${CLIA} ethereum balance -o "${ethBridgeBank}" -t "${ethereumBycERC20TokenAddr}")
# cli_ret "${result}" "balance" ".balance" "0" # cli_ret "${result}" "balance" ".balance" "0"
# ETH 这端 lock 7个 # ETH 这端 lock 7个
result=$(${CLIA} ethereum lock -m 7 -k "${ethTestAddrKey1}" -r "${chain33ReceiverAddr}" -t "${ethereumBycERC20TokenAddr}") result=$(${CLIA} ethereum lock -m 7 -k "${ethTestAddrKey1}" -r "${chain33ReceiverAddr}" -t "${ethereumBycERC20TokenAddr}")
...@@ -871,14 +871,14 @@ function Testethereum2EVMToChain33_byc() { ...@@ -871,14 +871,14 @@ function Testethereum2EVMToChain33_byc() {
# 查询 ETH 这端 bridgeBank 地址 7 # 查询 ETH 这端 bridgeBank 地址 7
result=$(${CLIA} ethereum balance -o "${ethBridgeBank}" -t "${ethereumBycERC20TokenAddr}") result=$(${CLIA} ethereum balance -o "${ethBridgeBank}" -t "${ethereumBycERC20TokenAddr}")
# cli_ret "${result}" "balance" ".balance" "7" # cli_ret "${result}" "balance" ".balance" "7"
sleep ${maturityDegree} sleep ${maturityDegree}
# chain33 chain33EthBridgeTokenAddr(ETH合约中)查询 lock 金额 # chain33 chain33EthBridgeTokenAddr(ETH合约中)查询 lock 金额
result=$(${Chain33Cli} evm query -a "${chain33BycBridgeTokenAddr}" -c "${chain33TestAddr1}" -b "balanceOf(${chain33ReceiverAddr})") result=$(${Chain33Cli} evm query -a "${chain33BycBridgeTokenAddr}" -c "${chain33TestAddr1}" -b "balanceOf(${chain33ReceiverAddr})")
# 结果是 7 * le8 # 结果是 7 * le8
# is_equal "${result}" "700000000" # is_equal "${result}" "700000000"
updateConfig "BYC" "${chain33BycBridgeTokenAddr}" updateConfig "BYC" "${chain33BycBridgeTokenAddr}"
configbridgevmxgoAddr "${XgoChain33BridgeBank}" configbridgevmxgoAddr "${XgoChain33BridgeBank}"
...@@ -890,10 +890,10 @@ function Testethereum2EVMToChain33_byc() { ...@@ -890,10 +890,10 @@ function Testethereum2EVMToChain33_byc() {
check_tx "${Chain33Cli}" "${hash}" check_tx "${Chain33Cli}" "${hash}"
result=$(${Chain33Cli} evm query -a "${chain33BycBridgeTokenAddr}" -c "${chain33DeployAddr}" -b "balanceOf(${chain33ReceiverAddr})") result=$(${Chain33Cli} evm query -a "${chain33BycBridgeTokenAddr}" -c "${chain33DeployAddr}" -b "balanceOf(${chain33ReceiverAddr})")
# is_equal "${result}" "4200000000" # is_equal "${result}" "4200000000"
result=$(${Chain33Cli} evm query -a "${chain33BycBridgeTokenAddr}" -c "${chain33DeployAddr}" -b "balanceOf(${XgoChain33BridgeBank})") result=$(${Chain33Cli} evm query -a "${chain33BycBridgeTokenAddr}" -c "${chain33DeployAddr}" -b "balanceOf(${XgoChain33BridgeBank})")
# is_equal "${result}" "500000000" # is_equal "${result}" "500000000"
} }
function AllRelayerMainTest() { function AllRelayerMainTest() {
...@@ -968,7 +968,7 @@ function AllRelayerMainTest() { ...@@ -968,7 +968,7 @@ function AllRelayerMainTest() {
${MainCli} send coins transfer -a 1000 -n test -t "1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs" -k "${chain33ReceiverAddrKey}" ${MainCli} send coins transfer -a 1000 -n test -t "1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs" -k "${chain33ReceiverAddrKey}"
echo_addrs echo_addrs
Testethereum2EVMToChain33_byc Testethereum2EVMToChain33_byc
echo -e "${GRE}=========== $FUNCNAME end ===========${NOC}" echo -e "${GRE}=========== $FUNCNAME end ===========${NOC}"
} }
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.23.0 // protoc-gen-go v1.26.0
// protoc v3.9.1 // protoc v3.9.1
// source: evmcontract.proto // source: evmcontract.proto
package types package types
import ( import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
) )
const ( const (
...@@ -21,10 +21,6 @@ const ( ...@@ -21,10 +21,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
//合约对象信息 //合约对象信息
type EVMContractObject struct { type EVMContractObject struct {
state protoimpl.MessageState state protoimpl.MessageState
......
...@@ -18,7 +18,6 @@ function updateConfig() { ...@@ -18,7 +18,6 @@ function updateConfig() {
signRawTxAndQuery "$FUNCNAME" "$privateKey" "${unsignedTx}" signRawTxAndQuery "$FUNCNAME" "$privateKey" "${unsignedTx}"
} }
function evmxgo_mint() { function evmxgo_mint() {
local data='{"jsonrpc":"2.0","id":1,"method":"Chain33.CreateTransaction","params":[{"execer":"evmxgo","actionName":"Mint","payload":{"symbol":"DOG","amount":10000000}}]}' local data='{"jsonrpc":"2.0","id":1,"method":"Chain33.CreateTransaction","params":[{"execer":"evmxgo","actionName":"Mint","payload":{"symbol":"DOG","amount":10000000}}]}'
unsignedTx=$(curl -s --data-binary "$data" -H 'content-type:text/plain;' ${MAIN_HTTP} | jq -r ".result") unsignedTx=$(curl -s --data-binary "$data" -H 'content-type:text/plain;' ${MAIN_HTTP} | jq -r ".result")
...@@ -75,8 +74,6 @@ function evmxgo_withdraw() { ...@@ -75,8 +74,6 @@ function evmxgo_withdraw() {
signRawTxAndQuery "$FUNCNAME" "$privateKey" "${unsignedTx}" signRawTxAndQuery "$FUNCNAME" "$privateKey" "${unsignedTx}"
} }
# 查询交易的执行结果 # 查询交易的执行结果
# 根据传入的规则,校验查询的结果 (参数1: 校验规则 参数2: 预期匹配结果) # 根据传入的规则,校验查询的结果 (参数1: 校验规则 参数2: 预期匹配结果)
function queryTransaction() { function queryTransaction() {
......
...@@ -4,6 +4,8 @@ package commands ...@@ -4,6 +4,8 @@ package commands
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"os"
"github.com/33cn/chain33/rpc/jsonclient" "github.com/33cn/chain33/rpc/jsonclient"
rpctypes "github.com/33cn/chain33/rpc/types" rpctypes "github.com/33cn/chain33/rpc/types"
"github.com/33cn/chain33/system/dapp/commands" "github.com/33cn/chain33/system/dapp/commands"
...@@ -12,7 +14,6 @@ import ( ...@@ -12,7 +14,6 @@ import (
evmxgotypes "github.com/33cn/plugin/plugin/dapp/evmxgo/types" evmxgotypes "github.com/33cn/plugin/plugin/dapp/evmxgo/types"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"os"
) )
/* /*
...@@ -31,7 +32,7 @@ func Cmd() *cobra.Command { ...@@ -31,7 +32,7 @@ func Cmd() *cobra.Command {
Args: cobra.MinimumNArgs(1), Args: cobra.MinimumNArgs(1),
} }
cmd.AddCommand( cmd.AddCommand(
//add sub command //add sub command
CreateTokenTransferCmd(), CreateTokenTransferCmd(),
CreateTokenWithdrawCmd(), CreateTokenWithdrawCmd(),
GetTokensCreatedCmd(), GetTokensCreatedCmd(),
...@@ -46,7 +47,6 @@ func Cmd() *cobra.Command { ...@@ -46,7 +47,6 @@ func Cmd() *cobra.Command {
return cmd return cmd
} }
// CreateTokenTransferCmd create raw transfer tx // CreateTokenTransferCmd create raw transfer tx
func CreateTokenTransferCmd() *cobra.Command { func CreateTokenTransferCmd() *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
...@@ -128,7 +128,6 @@ func createTokenWithdraw(cmd *cobra.Command, args []string) { ...@@ -128,7 +128,6 @@ func createTokenWithdraw(cmd *cobra.Command, args []string) {
commands.CreateAssetWithdraw(cmd, args, evmxgotypes.EvmxgoX) commands.CreateAssetWithdraw(cmd, args, evmxgotypes.EvmxgoX)
} }
// GetTokensCreatedCmd get finish created tokens // GetTokensCreatedCmd get finish created tokens
func GetTokensCreatedCmd() *cobra.Command { func GetTokensCreatedCmd() *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
...@@ -249,7 +248,6 @@ func parseTokenAssetsRes(arg ...interface{}) (interface{}, error) { ...@@ -249,7 +248,6 @@ func parseTokenAssetsRes(arg ...interface{}) (interface{}, error) {
return result, nil return result, nil
} }
// CreateRawTokenMintTxCmd create raw token mintage transaction // CreateRawTokenMintTxCmd create raw token mintage transaction
func CreateRawTokenMintTxCmd() *cobra.Command { func CreateRawTokenMintTxCmd() *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
...@@ -484,4 +482,4 @@ func queryTx(cmd *cobra.Command, args []string) { ...@@ -484,4 +482,4 @@ func queryTx(cmd *cobra.Command, args []string) {
var res types.ReplyTxInfos var res types.ReplyTxInfos
ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "Chain33.Query", params, &res)
ctx.Run() ctx.Run()
} }
\ No newline at end of file
...@@ -2,6 +2,7 @@ package executor ...@@ -2,6 +2,7 @@ package executor
import ( import (
"encoding/hex" "encoding/hex"
"github.com/33cn/chain33/common/db" "github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/system/dapp" "github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
......
This diff is collapsed.
...@@ -5,4 +5,3 @@ package rpc ...@@ -5,4 +5,3 @@ package rpc
* json rpc用Jrpc结构作为接收实例 * json rpc用Jrpc结构作为接收实例
* grpc使用channelClient结构作为接收实例 * grpc使用channelClient结构作为接收实例
*/ */
...@@ -19,7 +19,6 @@ const ( ...@@ -19,7 +19,6 @@ const (
EvmxgoActionBurn = 13 EvmxgoActionBurn = 13
) )
const ( const (
// TyLogEvmxgoTransfer log for token tranfer // TyLogEvmxgoTransfer log for token tranfer
TyLogEvmxgoTransfer = 313 TyLogEvmxgoTransfer = 313
......
package types package types
import ( import (
"reflect"
log "github.com/33cn/chain33/common/log/log15" log "github.com/33cn/chain33/common/log/log15"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
"reflect"
) )
/* /*
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.23.0 // protoc-gen-go v1.26.0
// protoc v3.9.1 // protoc v3.9.1
// source: evmxgo.proto // source: evmxgo.proto
...@@ -8,13 +8,13 @@ package types ...@@ -8,13 +8,13 @@ package types
import ( import (
context "context" context "context"
reflect "reflect"
sync "sync"
types "github.com/33cn/chain33/types" types "github.com/33cn/chain33/types"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
const ( const (
...@@ -24,10 +24,6 @@ const ( ...@@ -24,10 +24,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// action // action
type EvmxgoAction struct { type EvmxgoAction struct {
state protoimpl.MessageState state protoimpl.MessageState
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment