Commit 7e705ce3 authored by vipwzw's avatar vipwzw

auto ci

parent ddbe3a60
......@@ -821,25 +821,25 @@ function configbridgevmxgoAddr() {
function TestETH2EVMToChain33() {
# 查询 ETH 这端 bridgeBank 地址原来是 0
result=$(${CLIA} ethereum balance -o "${ethBridgeBank}")
# cli_ret "${result}" "balance" ".balance" "16"
# cli_ret "${result}" "balance" ".balance" "16"
# ETH 这端 lock 11个
result=$(${CLIA} ethereum lock -m 11 -k "${ethTestAddrKey1}" -r "${chain33ReceiverAddr}")
# cli_ret "${result}" "lock"
# cli_ret "${result}" "lock"
# eth 等待 2 个区块
sleep 4
# 查询 ETH 这端 bridgeBank 地址 11 原来16
result=$(${CLIA} ethereum balance -o "${ethBridgeBank}")
# cli_ret "${result}" "balance" ".balance" "27"
# cli_ret "${result}" "balance" ".balance" "27"
sleep ${maturityDegree}
# chain33 chain33EthBridgeTokenAddr(ETH合约中)查询 lock 金额
result=$(${Chain33Cli} evm query -a "${chain33EthBridgeTokenAddr}" -c "${chain33DeployAddr}" -b "balanceOf(${chain33ReceiverAddr})")
# 结果是 11 * le8
# is_equal "${result}" "4700000000"
# is_equal "${result}" "4700000000"
updateConfig "ETH" "${chain33EthBridgeTokenAddr}"
configbridgevmxgoAddr "${XgoChain33BridgeBank}"
......@@ -851,16 +851,16 @@ function TestETH2EVMToChain33() {
check_tx "${Chain33Cli}" "${hash}"
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})")
# is_equal "${result}" "500000000"
# is_equal "${result}" "500000000"
}
function Testethereum2EVMToChain33_byc() {
# 查询 ETH 这端 bridgeBank 地址原来是
result=$(${CLIA} ethereum balance -o "${ethBridgeBank}" -t "${ethereumBycERC20TokenAddr}")
# cli_ret "${result}" "balance" ".balance" "0"
# cli_ret "${result}" "balance" ".balance" "0"
# ETH 这端 lock 7个
result=$(${CLIA} ethereum lock -m 7 -k "${ethTestAddrKey1}" -r "${chain33ReceiverAddr}" -t "${ethereumBycERC20TokenAddr}")
......@@ -871,14 +871,14 @@ function Testethereum2EVMToChain33_byc() {
# 查询 ETH 这端 bridgeBank 地址 7
result=$(${CLIA} ethereum balance -o "${ethBridgeBank}" -t "${ethereumBycERC20TokenAddr}")
# cli_ret "${result}" "balance" ".balance" "7"
# cli_ret "${result}" "balance" ".balance" "7"
sleep ${maturityDegree}
# chain33 chain33EthBridgeTokenAddr(ETH合约中)查询 lock 金额
result=$(${Chain33Cli} evm query -a "${chain33BycBridgeTokenAddr}" -c "${chain33TestAddr1}" -b "balanceOf(${chain33ReceiverAddr})")
# 结果是 7 * le8
# is_equal "${result}" "700000000"
# is_equal "${result}" "700000000"
updateConfig "BYC" "${chain33BycBridgeTokenAddr}"
configbridgevmxgoAddr "${XgoChain33BridgeBank}"
......@@ -890,10 +890,10 @@ function Testethereum2EVMToChain33_byc() {
check_tx "${Chain33Cli}" "${hash}"
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})")
# is_equal "${result}" "500000000"
# is_equal "${result}" "500000000"
}
function AllRelayerMainTest() {
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc-gen-go v1.26.0
// protoc v3.9.1
// source: evmcontract.proto
package types
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
......@@ -21,10 +21,6 @@ const (
_ = 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 {
state protoimpl.MessageState
......
......@@ -18,7 +18,6 @@ function updateConfig() {
signRawTxAndQuery "$FUNCNAME" "$privateKey" "${unsignedTx}"
}
function evmxgo_mint() {
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")
......@@ -75,8 +74,6 @@ function evmxgo_withdraw() {
signRawTxAndQuery "$FUNCNAME" "$privateKey" "${unsignedTx}"
}
# 查询交易的执行结果
# 根据传入的规则,校验查询的结果 (参数1: 校验规则 参数2: 预期匹配结果)
function queryTransaction() {
......
......@@ -4,6 +4,8 @@ package commands
import (
"encoding/json"
"fmt"
"os"
"github.com/33cn/chain33/rpc/jsonclient"
rpctypes "github.com/33cn/chain33/rpc/types"
"github.com/33cn/chain33/system/dapp/commands"
......@@ -12,7 +14,6 @@ import (
evmxgotypes "github.com/33cn/plugin/plugin/dapp/evmxgo/types"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"os"
)
/*
......@@ -46,7 +47,6 @@ func Cmd() *cobra.Command {
return cmd
}
// CreateTokenTransferCmd create raw transfer tx
func CreateTokenTransferCmd() *cobra.Command {
cmd := &cobra.Command{
......@@ -128,7 +128,6 @@ func createTokenWithdraw(cmd *cobra.Command, args []string) {
commands.CreateAssetWithdraw(cmd, args, evmxgotypes.EvmxgoX)
}
// GetTokensCreatedCmd get finish created tokens
func GetTokensCreatedCmd() *cobra.Command {
cmd := &cobra.Command{
......@@ -249,7 +248,6 @@ func parseTokenAssetsRes(arg ...interface{}) (interface{}, error) {
return result, nil
}
// CreateRawTokenMintTxCmd create raw token mintage transaction
func CreateRawTokenMintTxCmd() *cobra.Command {
cmd := &cobra.Command{
......
......@@ -2,6 +2,7 @@ package executor
import (
"encoding/hex"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types"
......
This diff is collapsed.
......@@ -5,4 +5,3 @@ package rpc
* json rpc用Jrpc结构作为接收实例
* grpc使用channelClient结构作为接收实例
*/
......@@ -19,7 +19,6 @@ const (
EvmxgoActionBurn = 13
)
const (
// TyLogEvmxgoTransfer log for token tranfer
TyLogEvmxgoTransfer = 313
......
package types
import (
"reflect"
log "github.com/33cn/chain33/common/log/log15"
"github.com/33cn/chain33/types"
"reflect"
)
/*
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc-gen-go v1.26.0
// protoc v3.9.1
// source: evmxgo.proto
......@@ -8,13 +8,13 @@ package types
import (
context "context"
reflect "reflect"
sync "sync"
types "github.com/33cn/chain33/types"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
......@@ -24,10 +24,6 @@ const (
_ = 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
type EvmxgoAction struct {
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