Skip to content

Commit

Permalink
polygon rebase, new version upd
Browse files Browse the repository at this point in the history
  • Loading branch information
JackBekket committed Dec 22, 2022
1 parent 04a7958 commit 351844c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/MoonSHRD/TelegramNFTWizard
go 1.17

require (
github.com/MoonSHRD/IKY-telegram-bot v0.2.1
github.com/MoonSHRD/TelegramNFT-Wizard-Contracts v0.3.0
github.com/MoonSHRD/IKY-telegram-bot v1.0.1
github.com/MoonSHRD/TelegramNFT-Wizard-Contracts v0.4.0
github.com/StarkBotsIndustries/telegraph/v2 v2.0.0
github.com/ethereum/go-ethereum v1.10.26
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/MoonSHRD/IKY-telegram-bot v0.2.1 h1:QJjJwMtzpuSZEUh1d8LRjpt9I7zm3hN0PtZjvRkJ0BM=
github.com/MoonSHRD/IKY-telegram-bot v0.2.1/go.mod h1:oR7+q9qz0IivIxTHN58xQRIA+dg+1dLXwrNH8rnnTFc=
github.com/MoonSHRD/TelegramNFT-Wizard-Contracts v0.3.0 h1:SqMOxvl2PElSlDiOjfDx/Fqs82BVuUCKDIYjX244tBY=
github.com/MoonSHRD/TelegramNFT-Wizard-Contracts v0.3.0/go.mod h1:FINo9dc++NH/xdhoy8YJM9nZiEIlIs38lX0lgCZeBwY=
github.com/MoonSHRD/IKY-telegram-bot v1.0.1 h1:Us65jTTdMjyF1XU8D7oVWRKZ0AV5rdsk0f1jBsoQKn4=
github.com/MoonSHRD/IKY-telegram-bot v1.0.1/go.mod h1:oR7+q9qz0IivIxTHN58xQRIA+dg+1dLXwrNH8rnnTFc=
github.com/MoonSHRD/TelegramNFT-Wizard-Contracts v0.4.0 h1:QxzNbOCyq4MzpU5RGnZNbIV5LS8QOYMpWMd/VzehvyA=
github.com/MoonSHRD/TelegramNFT-Wizard-Contracts v0.4.0/go.mod h1:FINo9dc++NH/xdhoy8YJM9nZiEIlIs38lX0lgCZeBwY=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8=
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
Expand Down
16 changes: 8 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ import (
)

//http://t.me/NFT_Wizard_bot
var yesNoKeyboard = tgbotapi.NewReplyKeyboard(
tgbotapi.NewKeyboardButtonRow(
tgbotapi.NewKeyboardButton("Yes"),
tgbotapi.NewKeyboardButton("No")),
)




Expand Down Expand Up @@ -295,7 +291,11 @@ func main() {
// create link to mint NFT
createLink(userDatabase[update.Message.From.ID].tgid,uri_short[2],baseURL)

subscription, err := SubscribeForCreateItem(session_single_nft, ch) // this is subscription to UNINDEXED event.
// make rule for watch
var looking_for []string
looking_for[0] = uri_short[2]

subscription, err := SubscribeForCreateItem(session_single_nft, ch, looking_for) // this is subscription to UNINDEXED event.
if err != nil {
log.Println(err)
}
Expand Down Expand Up @@ -435,12 +435,12 @@ func checkError(err error) {
}

// subscribing for CreateItem events. We use watchers without fast-forwarding past events
func SubscribeForCreateItem(session *SingletonNFT.SingletonNFTSession, listenChannel chan<- *SingletonNFT.SingletonNFTItemCreated) (event.Subscription, error) {
func SubscribeForCreateItem(session *SingletonNFT.SingletonNFTSession, listenChannel chan<- *SingletonNFT.SingletonNFTItemCreated, file_id []string) (event.Subscription, error) {
subscription, err := session.Contract.WatchItemCreated(&bind.WatchOpts{
Start: nil, //last block
Context: nil, // nil = no timeout
}, listenChannel,
// applierTGID,
file_id,
)
if err != nil {
return nil, err
Expand Down

0 comments on commit 351844c

Please sign in to comment.