-
Notifications
You must be signed in to change notification settings - Fork 27
[solver/protocol-smart-contracts] Integrate accepting deposits to run jobs #532
Copy link
Copy link
Open
Description
General Description
As a resource provider or job creator I want to be able to deposit Lilypad token into the Lilypad Protocol so that I can run jobs on the network
Which system(s) or functionality does this affect
This can be one or many. Please also include this in the title
solver, protocol-smart-contracts
Describe the changes, and how this affects/ interacts with each system.
- Create a function in the apiv2.go that will initiate a deposit of Lilypad tokens that will first call the
approvefunction on the LilypadToken contract and then theacceptResourceProviderCollateralmethod from the Lilypad Proxy. This function or business logic calling it will need to distinguish whether a resource provider is calling it or a job creator
Note:
- A resource provider must deposit a minimum of 10 LILY token during any deposit action
- Anyone looking to deposit must first approve the paymentEngine contract address to receive the funds (the address for that contract can either be retrieved from the toml file or programatically from the LilypadContractRegistry)
- We will need to make the above method a callable function through the resource provider code and CLI with the assumption that the wallet at the time of calling has Lilypad tokens available
Reactions are currently unavailable