Skip to content

Commit

Permalink
Merge pull request #762 from onflow/storefront
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent authored Oct 17, 2024
2 parents b5273bf + dd0bcd7 commit 53bbf91
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
28 changes: 10 additions & 18 deletions emulator/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,15 @@ import (

flowsdk "github.com/onflow/flow-go-sdk"
"github.com/onflow/flow-go-sdk/templates"
"github.com/onflow/flow-go/fvm/systemcontracts"
flowgo "github.com/onflow/flow-go/model/flow"
"github.com/onflow/flow-nft/lib/go/contracts"
// TODO:
//nftstorefront "github.com/onflow/nft-storefront/lib/go/contracts"
nftstorefront "github.com/onflow/nft-storefront/lib/go/contracts"
)

func NewCommonContracts(chain flowgo.Chain) []ContractDescription {
// TODO:
// sc := systemcontracts.SystemContractsForChain(chain.ChainID())
// ftAddress := flowsdk.HexToAddress(sc.FungibleToken.Address.HexWithPrefix())
sc := systemcontracts.SystemContractsForChain(chain.ChainID())
ftAddress := flowsdk.HexToAddress(sc.FungibleToken.Address.HexWithPrefix())

serviceAddress := flowsdk.HexToAddress(chain.ServiceAddress().HexWithPrefix())
return []ContractDescription{
Expand All @@ -44,19 +43,12 @@ func NewCommonContracts(chain flowgo.Chain) []ContractDescription {
Description: "✨ Example NFT contract",
Source: contracts.ExampleNFT(serviceAddress, serviceAddress, serviceAddress),
},
// TODO:
//{
// Name: "NFTStorefrontV2",
// Address: serviceAddress,
// Description: "✨ NFT Storefront contract v2",
// Source: nftstorefront.NFTStorefront(2, ftAddress.String(), serviceAddress.String()),
//},
//{
// Name: "NFTStorefront",
// Address: serviceAddress,
// Description: "✨ NFT Storefront contract",
// Source: nftstorefront.NFTStorefront(1, ftAddress.String(), serviceAddress.String()),
//},
{
Name: "NFTStorefrontV2",
Address: serviceAddress,
Description: "✨ NFT Storefront contract v2",
Source: nftstorefront.NFTStorefrontV2(ftAddress.String(), serviceAddress.String()),
},
}
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ require (
github.com/onflow/flow-go-sdk v1.0.0
github.com/onflow/flow-nft/lib/go/contracts v1.2.1
github.com/onflow/flow/protobuf/go/flow v0.4.7
github.com/onflow/nft-storefront/lib/go/contracts v1.0.0
github.com/prometheus/client_golang v1.18.0
github.com/psiemens/graceland v1.0.0
github.com/psiemens/sconfig v0.1.0
Expand Down Expand Up @@ -158,7 +159,6 @@ require (
github.com/onflow/flow-ft/lib/go/templates v1.0.0 // indirect
github.com/onflow/flow-nft/lib/go/templates v1.2.0 // indirect
github.com/onflow/go-ethereum v1.14.7 // indirect
github.com/onflow/nft-storefront/lib/go/contracts v1.0.0 // indirect
github.com/onflow/sdks v0.6.0-preview.1 // indirect
github.com/onflow/wal v1.0.2 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
Expand Down

0 comments on commit 53bbf91

Please sign in to comment.