Add default auction params for deployment auction

This commit is contained in:
Prathamesh Musale 2024-10-07 14:26:47 +05:30
parent 472a452d61
commit 49a730707e
2 changed files with 41 additions and 47 deletions

View File

@ -12,9 +12,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
import shutil
import sys
import tempfile
import click
import yaml
@ -43,23 +41,23 @@ def fatal(msg: str):
)
@click.option(
"--commits-duration",
help="Auction commits duration (in seconds).",
required=True,
help="Auction commits duration (in seconds) (default: 600).",
default=600,
)
@click.option(
"--reveals-duration",
help="Auction reveals duration (in seconds).",
required=True,
help="Auction reveals duration (in seconds) (default: 600).",
default=600,
)
@click.option(
"--commit-fee",
help="Auction bid commit fee (in alnt).",
required=True,
help="Auction bid commit fee (in alnt) (default: 100000).",
default=100000,
)
@click.option(
"--reveal-fee",
help="Auction bid reveal fee (in alnt).",
required=True,
help="Auction bid reveal fee (in alnt) (default: 100000).",
default=100000,
)
@click.option(
"--max-price",
@ -88,9 +86,7 @@ def command(
max_price,
num_providers,
dry_run,
): # noqa: C901
tempdir = tempfile.mkdtemp()
try:
):
laconic = LaconicRegistryClient(laconic_config)
app_record = laconic.get_record(app)
@ -127,5 +123,3 @@ def command(
# Publish the deployment auction record
laconic.publish(deployment_auction)
finally:
shutil.rmtree(tempdir, ignore_errors=True)

View File

@ -465,7 +465,7 @@ class LaconicRegistryClient:
return AttrDict(json.loads(logged_cmd(self.log_file, *args)))
def create_auction(self, auction):
if auction["kind"] == "provider":
if auction["kind"] == AUCTION_KIND_PROVIDER:
args = [
"laconic",
"-c",