2019-01-24 20:41:30 +00:00
|
|
|
// VulcanizeDB
|
|
|
|
// Copyright © 2018 Vulcanize
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2018-08-16 21:36:35 +00:00
|
|
|
|
|
|
|
package test_data
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"strconv"
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common"
|
|
|
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
|
|
|
"github.com/ethereum/go-ethereum/core/types"
|
|
|
|
|
2018-11-12 20:59:16 +00:00
|
|
|
"github.com/vulcanize/vulcanizedb/pkg/fakes"
|
2018-08-16 21:36:35 +00:00
|
|
|
"github.com/vulcanize/vulcanizedb/pkg/transformers/tend"
|
|
|
|
)
|
|
|
|
|
2018-09-04 20:50:29 +00:00
|
|
|
var (
|
2018-09-11 19:01:45 +00:00
|
|
|
tendBidId = int64(10)
|
2018-09-04 20:50:29 +00:00
|
|
|
tendLot = "85000000000000000000"
|
|
|
|
tendBid = "1000000000000000000"
|
2019-02-05 21:43:20 +00:00
|
|
|
tendGuy = "0000000000000000000000007d7bee5fcfd8028cf7b00876c5b1421c800561a6"
|
2018-09-04 20:50:29 +00:00
|
|
|
tendData = "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000644b43ed12000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000049b9ca9a6943400000000000000000000000000000000000000000000000000000de0b6b3a7640000"
|
|
|
|
tendTransactionHash = "0x7909c8793ded2b8348f5db623044fbc26bb7ab78ad5792897abdf68ddc1df63d"
|
2018-11-15 11:57:29 +00:00
|
|
|
tendBlockHash = "0xa8ea87147c0a68daeb6b1d9f8c0937ba975a650809cab80d19c969e8d0df452c"
|
2018-09-04 20:50:29 +00:00
|
|
|
)
|
2018-08-16 21:36:35 +00:00
|
|
|
|
2018-09-04 20:50:29 +00:00
|
|
|
var TendLogNote = types.Log{
|
2019-01-23 18:44:09 +00:00
|
|
|
Address: common.HexToAddress(KovanFlipperContractAddress),
|
2018-09-04 20:50:29 +00:00
|
|
|
Topics: []common.Hash{
|
|
|
|
common.HexToHash("0x4b43ed1200000000000000000000000000000000000000000000000000000000"), //abbreviated tend function signature
|
|
|
|
common.HexToHash("0x0000000000000000000000007d7bee5fcfd8028cf7b00876c5b1421c800561a6"), //msg caller address
|
|
|
|
common.HexToHash("0x000000000000000000000000000000000000000000000000000000000000000a"), //first param of the function called (i.e. flip kick id)
|
|
|
|
common.HexToHash("0x0000000000000000000000000000000000000000000000049b9ca9a694340000"), //second param of the function called (i.e. lot)
|
|
|
|
},
|
|
|
|
Data: hexutil.MustDecode(tendData),
|
|
|
|
BlockNumber: 11,
|
|
|
|
TxHash: common.HexToHash(tendTransactionHash),
|
|
|
|
TxIndex: 10,
|
2018-11-12 20:59:16 +00:00
|
|
|
BlockHash: fakes.FakeHash,
|
2018-09-04 20:50:29 +00:00
|
|
|
Index: 1,
|
2018-08-16 21:36:35 +00:00
|
|
|
Removed: false,
|
|
|
|
}
|
|
|
|
|
2018-11-12 20:59:16 +00:00
|
|
|
var rawTendLog, _ = json.Marshal(TendLogNote)
|
2018-09-04 20:50:29 +00:00
|
|
|
var TendModel = tend.TendModel{
|
2018-09-11 19:01:45 +00:00
|
|
|
BidId: strconv.FormatInt(tendBidId, 10),
|
2018-08-16 21:36:35 +00:00
|
|
|
Lot: tendLot,
|
|
|
|
Bid: tendBid,
|
|
|
|
Guy: tendGuy,
|
2018-10-22 21:07:19 +00:00
|
|
|
LogIndex: TendLogNote.Index,
|
2018-09-04 20:50:29 +00:00
|
|
|
TransactionIndex: TendLogNote.TxIndex,
|
2018-11-12 20:59:16 +00:00
|
|
|
Raw: rawTendLog,
|
2018-08-16 21:36:35 +00:00
|
|
|
}
|