From 5b47c14affd76bf757fedf57067fa90a39c2121d Mon Sep 17 00:00:00 2001 From: Eugenio Paluello Date: Mon, 18 Nov 2024 00:53:03 +0100 Subject: [PATCH] fix: fee balancer --- aws_lambda/fee_balancer/Dockerfile | 2 ++ aws_lambda/fee_balancer/fee_balancer.py | 4 ---- .../fee_balancer/fee_balancer_lambda_stack.py | 14 -------------- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/aws_lambda/fee_balancer/Dockerfile b/aws_lambda/fee_balancer/Dockerfile index 6975c83b0..f851fa0d6 100644 --- a/aws_lambda/fee_balancer/Dockerfile +++ b/aws_lambda/fee_balancer/Dockerfile @@ -2,6 +2,8 @@ # trunk-ignore-all(checkov/CKV_DOCKER_3) # trunk-ignore-all(hadolint/DL3013) # trunk-ignore-all(hadolint/DL3033) +# trunk-ignore-all(trivy/DS002) +# trunk-ignore-all(trivy/DS026) FROM amazon/aws-lambda-python:3.10 RUN yum update -y && \ diff --git a/aws_lambda/fee_balancer/fee_balancer.py b/aws_lambda/fee_balancer/fee_balancer.py index 84830a967..eae6dc487 100644 --- a/aws_lambda/fee_balancer/fee_balancer.py +++ b/aws_lambda/fee_balancer/fee_balancer.py @@ -136,7 +136,3 @@ async def withdraw_fee(starknet_address, nonce, eth_address, eth_private_key): # Wait for transaction receipt tx_receipt = web3.eth.wait_for_transaction_receipt(send_tx) logger.info(tx_receipt) - - -if __name__ == "__main__": - asyncio.run(check_and_fund_relayers()) diff --git a/aws_lambda/fee_balancer/fee_balancer_lambda_stack.py b/aws_lambda/fee_balancer/fee_balancer_lambda_stack.py index 744765416..6d9b95914 100644 --- a/aws_lambda/fee_balancer/fee_balancer_lambda_stack.py +++ b/aws_lambda/fee_balancer/fee_balancer_lambda_stack.py @@ -86,20 +86,6 @@ def build_lambda_func(self): ) ) - # param_arns = [ - # os.environ.get("RELAYERS_PREV_TOTAL_BALANCE_PARAM_ARN"), - # os.environ.get("ACCOUNT_PREV_BALANCE_PARAM_ARN"), - # os.environ.get("EARNING_PERCENTAGE_PARAM_ARN"), - # ] - # param_arns = [arn for arn in param_arns if arn is not None] - - # self.prediction_lambda.add_to_role_policy( - # iam.PolicyStatement( - # actions=["ssm:GetParameter", "ssm:PutParameter"], - # resources=param_arns, - # ) - # ) - events.Rule( self, "ScheduleRule",