Skip to content

[solver/protocol-smart-contracts] Integrate accepting deposits to run jobs #532

@narbs91

Description

@narbs91

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.

  1. Create a function in the apiv2.go that will initiate a deposit of Lilypad tokens that will first call the approve function on the LilypadToken contract and then the acceptResourceProviderCollateral method 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)
  1. 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

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions