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-09-06 21:42:24 +00:00
|
|
|
|
2018-08-22 17:44:35 +00:00
|
|
|
package test_data
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"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-22 17:44:35 +00:00
|
|
|
"github.com/vulcanize/vulcanizedb/pkg/transformers/bite"
|
|
|
|
"math/big"
|
|
|
|
)
|
|
|
|
|
2019-01-23 18:44:09 +00:00
|
|
|
const (
|
2018-08-22 17:44:35 +00:00
|
|
|
TemporaryBiteBlockNumber = int64(26)
|
|
|
|
TemporaryBiteData = "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005"
|
|
|
|
TemporaryBiteTransaction = "0x5c698f13940a2153440c6d19660878bc90219d9298fdcf37365aa8d88d40fc42"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
biteInk = big.NewInt(1)
|
|
|
|
biteArt = big.NewInt(2)
|
|
|
|
biteTab = big.NewInt(3)
|
|
|
|
biteFlip = big.NewInt(4)
|
|
|
|
biteIArt = big.NewInt(5)
|
|
|
|
biteRawJson, _ = json.Marshal(EthBiteLog)
|
2018-10-18 16:35:27 +00:00
|
|
|
biteIlk = [32]byte{69, 84, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
|
|
|
biteLad = [32]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 216, 180, 20, 126, 218, 128, 254, 199, 18, 42, 225, 109, 162, 71, 156, 189, 127, 251}
|
2019-01-28 22:52:47 +00:00
|
|
|
biteIlkString = "4554480000000000000000000000000000000000000000000000000000000000"
|
2019-02-05 21:43:20 +00:00
|
|
|
biteLadString = "0000000000000000000000000000d8b4147eda80fec7122ae16da2479cbd7ffb"
|
2018-08-22 17:44:35 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var EthBiteLog = types.Log{
|
2019-01-23 18:44:09 +00:00
|
|
|
Address: common.HexToAddress("0x2f34f22a00ee4b7a8f8bbc4eaee1658774c624e0"),
|
2018-08-22 17:44:35 +00:00
|
|
|
Topics: []common.Hash{
|
|
|
|
common.HexToHash("0x99b5620489b6ef926d4518936cfec15d305452712b88bd59da2d9c10fb0953e8"),
|
2018-10-18 16:35:27 +00:00
|
|
|
common.HexToHash("0x4554480000000000000000000000000000000000000000000000000000000000"),
|
|
|
|
common.HexToHash("0x0000000000000000000000000000d8b4147eda80fec7122ae16da2479cbd7ffb"),
|
2018-08-22 17:44:35 +00:00
|
|
|
},
|
|
|
|
Data: hexutil.MustDecode(TemporaryBiteData),
|
|
|
|
BlockNumber: uint64(TemporaryBiteBlockNumber),
|
|
|
|
TxHash: common.HexToHash(TemporaryBiteTransaction),
|
|
|
|
TxIndex: 111,
|
2018-11-12 20:59:16 +00:00
|
|
|
BlockHash: fakes.FakeHash,
|
2018-10-19 16:15:01 +00:00
|
|
|
Index: 7,
|
2018-08-22 17:44:35 +00:00
|
|
|
Removed: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
var BiteEntity = bite.BiteEntity{
|
|
|
|
Ilk: biteIlk,
|
2018-09-12 14:10:34 +00:00
|
|
|
Urn: biteLad,
|
2018-08-22 17:44:35 +00:00
|
|
|
Ink: biteInk,
|
|
|
|
Art: biteArt,
|
|
|
|
Tab: biteTab,
|
|
|
|
Flip: biteFlip,
|
|
|
|
IArt: biteIArt,
|
2018-10-19 16:15:01 +00:00
|
|
|
LogIndex: EthBiteLog.Index,
|
2018-08-22 17:44:35 +00:00
|
|
|
TransactionIndex: EthBiteLog.TxIndex,
|
|
|
|
Raw: EthBiteLog,
|
|
|
|
}
|
|
|
|
|
|
|
|
var BiteModel = bite.BiteModel{
|
2018-10-08 02:51:37 +00:00
|
|
|
Ilk: biteIlkString,
|
|
|
|
Urn: biteLadString,
|
2018-08-22 17:44:35 +00:00
|
|
|
Ink: biteInk.String(),
|
|
|
|
Art: biteArt.String(),
|
2018-10-19 16:15:01 +00:00
|
|
|
IArt: biteIArt.String(),
|
2018-08-22 17:44:35 +00:00
|
|
|
Tab: biteTab.String(),
|
2018-10-16 19:51:26 +00:00
|
|
|
NFlip: biteFlip.String(),
|
2018-10-19 16:15:01 +00:00
|
|
|
LogIndex: EthBiteLog.Index,
|
2018-08-22 17:44:35 +00:00
|
|
|
TransactionIndex: EthBiteLog.TxIndex,
|
2018-11-12 20:59:16 +00:00
|
|
|
Raw: biteRawJson,
|
2018-08-22 17:44:35 +00:00
|
|
|
}
|