Closed guidanoli closed 4 months ago
This could be done in a more "manual" way. We just have to embed the Bounty files inside the machine, and have the bounties itself being added through inputs, like the "ordinary" ones, but with a special field or value on the "file" field, that indicates it have to search the file inside the machine. This way there is no need to modify the front end nor the Application State.
It will have the costs of adding an input, but not the limit on the bounty file
This solution may work for a few built-in bounties, but it may get costly (and annoying) to add built-in bounties one-by-one.
We have to find a way to add bounties before spinning up the machine. This is necessary for large bounties that would be too expensive or too large to add via inputs. One example is the Solidity bounty.
Between all the fields of the
AppBounty
struct, theInputIndex
field would have to be made optional because it would not be added via an input. This would indicate to the consumer of the state (in our case, the web front-end), that the bounty was built into the base image.In the back-end, we'd also have to modularize the code that adds a bounty from the
Advance
function, so that we can call it in themain
function before callingrollmelette.Run
. TheCodeZipBinary
parameter would have to be serialized to some file likebuiltin-bouties.json
.