kopia lustrzana https://github.com/bugout-dev/moonstream
Remove abi on s3_path.
rodzic
c76e5ca129
commit
2bf3ced7a5
|
@ -20,7 +20,6 @@ from ..settings import (
|
||||||
MOONSTREAM_APPLICATION_ID,
|
MOONSTREAM_APPLICATION_ID,
|
||||||
bugout_client as bc,
|
bugout_client as bc,
|
||||||
MOONSTREAM_SMARTCONTRACTS_ABI_BUCKET,
|
MOONSTREAM_SMARTCONTRACTS_ABI_BUCKET,
|
||||||
BUGOUT_REQUEST_TIMEOUT_SECONDS,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -104,9 +103,7 @@ async def add_subscription_handler(
|
||||||
bucket = MOONSTREAM_SMARTCONTRACTS_ABI_BUCKET
|
bucket = MOONSTREAM_SMARTCONTRACTS_ABI_BUCKET
|
||||||
|
|
||||||
result_bytes = abi.encode("utf-8")
|
result_bytes = abi.encode("utf-8")
|
||||||
result_key = (
|
result_key = f"v1/{resource.resource_data['address']}/{resource.id}/abi.json"
|
||||||
f"abi/v1/{resource.resource_data['address']}/{resource.id}/abi.json"
|
|
||||||
)
|
|
||||||
|
|
||||||
s3_client.put_object(
|
s3_client.put_object(
|
||||||
Body=result_bytes,
|
Body=result_bytes,
|
||||||
|
@ -123,7 +120,7 @@ async def add_subscription_handler(
|
||||||
update_resource["bucket"] = MOONSTREAM_SMARTCONTRACTS_ABI_BUCKET
|
update_resource["bucket"] = MOONSTREAM_SMARTCONTRACTS_ABI_BUCKET
|
||||||
update_resource[
|
update_resource[
|
||||||
"s3_path"
|
"s3_path"
|
||||||
] = f"abi/v1/{resource.resource_data['address']}/{resource.id}/abi.json"
|
] = f"v1/{resource.resource_data['address']}/{resource.id}/abi.json"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
updated_resource: BugoutResource = bc.update_resource(
|
updated_resource: BugoutResource = bc.update_resource(
|
||||||
|
|
Ładowanie…
Reference in New Issue