flip-fest icon indicating copy to clipboard operation
flip-fest copied to clipboard

Emulator Feature: Bootstrap with default contracts

Open srinjoyc opened this issue 4 years ago β€’ 12 comments
trafficstars

πŸ‘‹ Β  If you are interested in working on this issue, please check out the Getting Started guide on HackerEarth!

Description (Problem Statement)

The emulator is currently bootstrapped with (original contracts):

  • FlowFees
  • FlowServiceAccount
  • FlowStorageFees
  • FlowToken
  • FungibleToken

There are also other contracts that are very commonly used and it would be practical if emulator came with those as well (new contracts):

An emulator flag should be introduced -onlyBasicContracts (choose better name if possible) when it is true only the original contracts should be deployed. By default it should be false, so all contracts are deployed.

The output of the deployed emulator contracts, when you start the emulator:

image

Should reflect the change. Also this display should be improved for readability (one line per contract).

Experience Required

  • Familiarity with Go - able to parse and read emulator repo
  • Familiarity with Cadence - able to parse and read the deployed contracts

Minimum Feature Set (Acceptance Criteria)

When starting the emulator the default deployed contracts should also include the new ones by default.

When starting the emulator with a -onlyBasicContracts flag only the original contracts should be deployed

The output of the emulator when starting it up should reflect actually deployed contracts.

Software Requirements

Maintainability

  • The tools or libraries used to construct the solution should be well vetted and well maintained
  • Code should be written in a way that can be extended with new functionality and clear enough for open-source developers to contribute to.

Other Requirements

Documentation

  • The existing documentation needs to reflect this change

Judging Criteria

Resources

srinjoyc avatar Sep 14 '21 12:09 srinjoyc

Hi πŸ‘‹ my name is Gregor, and as a software engineer working on developer tools, I will be your point of contact for this task, so good luck, and don't hesitate to reach out to me with any problems or questions.

I'll keep an eye on your progress and will be reviewing your code.

You can comment here or find me on Discord (I'm sideninja#1970). Join the Flow Discord server if you're not there already!

devbugging avatar Sep 16 '21 08:09 devbugging

Hi Gregor! I'm kind of curious about the emulator in general, so happy to take this on!

I made a team for the hackathon named Team FlashyTigers, but no one's in the team yet except for me

mwufi avatar Sep 23 '21 17:09 mwufi

I made a team for the hackathon named Team FlashyTigers, but no one's in the team yet except for me

That's totally ok! You can submit as a solo team if you'd like.

Great to have you working on this. You can ping @sideninja with any questions you have.

@mwufi Do you need any help getting started on the implementation?

psiemens avatar Sep 23 '21 23:09 psiemens

@psiemens sure! i'm just getting started on it now and will ping you/@sideninja on the Discord!!

mwufi avatar Sep 24 '21 16:09 mwufi

Hey! I've taken a first stab at this here (https://github.com/onflow/flow-go/pull/1353), by including the NFT contracts!

Does this look like a good approach?

(the flow-emulator change is rather small https://github.com/onflow/flow-emulator/pull/86)

mwufi avatar Sep 25 '21 02:09 mwufi

Hi, @mwufi as quickly discussed on Discord I would suggest you move all the bootstrap contract code from FVM to the emulator as these contracts are specific to the emulator use and not generic to all other networks. You could create a bootstrap procedure in the emulator to achieve this. But anyhow great work so far. Going forward I also suggest you to open a PR on this repository with included links as mentioned in the flip fest instructions.

devbugging avatar Sep 28 '21 08:09 devbugging

OMG! almost there!

image

mwufi avatar Sep 29 '21 19:09 mwufi

Hm... does anyone want to review the change in flow-emulator? Could be fun!

mwufi avatar Sep 30 '21 20:09 mwufi

Hm... does anyone want to review the change in flow-emulator? Could be fun!

πŸŽ‰ We'll be reviewing shortly!

psiemens avatar Oct 03 '21 14:10 psiemens

Good day @mwufi!

Thanks so much for all your hardwork & participation. In order to finalize winners & prepare for prize payout, we'll need the following actions from your end.

Please provide the following information byΒ Nov 17, 2021, (in this GH Issue is fine):

1. Team Information

  • Team Members Information - Github Username + Email Contact + Percentage of prize allocation (total should = 100%)
  • All mentioned members MUST react to the post with a πŸ‘ which will act as confirmation that the information is correct, or a πŸ‘Ž to indicate that the information is not correct.
  • We will be reaching out via e-mail

πŸŽ–IMPORTANT: We will only proceed with prize payouts once all members have confirmed with πŸ‘ on the post.

2. Video Demo (optional)

  • Please provide a 5-minute video demo to be featured & showcased in the FLIP Fest Closing Ceremonies
  • Link format & Downloadable (eg. Google Drive, Vimeo)
  • Content Format (Problem Statement, your work / how you solved it, final outcome)

We will be hosting Closing Ceremonies on November 23rd, 8AM PT where we'll having closing remarks from Dete & will be announcing the winners! I'll share the details here before Nov 17.

kimcodeashian avatar Nov 12 '21 23:11 kimcodeashian

Hey folks,

We've received and reviewed over 82 submissions! What an amazing community on Flow! To commemorate all the hard work done, we have finalized winners and will be announcing them during our Closing Ceremony on Nov 23rd, 8AM PT. Be sure to join us - there may be some attendance prizes & a keynote from our CTO, Dete πŸ˜‰!

RSVP here so you don't miss out! See you then!

kimcodeashian avatar Nov 17 '21 01:11 kimcodeashian

Hi @kimcodeashian !

Team Information: Github mwufi Email [email protected] Allocation: 100

This one is too short for a video :))

mwufi avatar Nov 18 '21 01:11 mwufi