feat: add meta-auth #4
@ -59,7 +59,7 @@ confidence=
|
|||||||
#
|
#
|
||||||
# Kubeflow disables string-interpolation because we are starting to use f
|
# Kubeflow disables string-interpolation because we are starting to use f
|
||||||
# style strings
|
# style strings
|
||||||
disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,missing-docstring,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,relative-import,invalid-name,bad-continuation,no-member,locally-disabled,fixme,import-error,too-many-locals,no-name-in-module,too-many-instance-attributes,no-self-use,logging-fstring-interpolation
|
disable=old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,missing-docstring,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,relative-import,invalid-name,bad-continuation,no-member,locally-disabled,fixme,import-error,too-many-locals,no-name-in-module,too-many-instance-attributes,no-self-use,logging-fstring-interpolation
|
||||||
|
|
||||||
|
|
||||||
[REPORTS]
|
[REPORTS]
|
||||||
|
@ -10,7 +10,7 @@ registry_address = 0xcf60ebc445b636a5ab787f9e8bc465a2a3ef8299
|
|||||||
[meta]
|
[meta]
|
||||||
url = http://localhost:63380
|
url = http://localhost:63380
|
||||||
http_origin =
|
http_origin =
|
||||||
|
auth_token =
|
||||||
[rpc]
|
[rpc]
|
||||||
provider = http://localhost:63545
|
provider = http://localhost:63545
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ registry_address = 0xcf60ebc445b636a5ab787f9e8bc465a2a3ef8299
|
|||||||
[meta]
|
[meta]
|
||||||
url = http://localhost:8000
|
url = http://localhost:8000
|
||||||
http_origin =
|
http_origin =
|
||||||
|
auth_token =
|
||||||
|
|
||||||
[rpc]
|
[rpc]
|
||||||
provider = http://localhost:8545
|
provider = http://localhost:8545
|
||||||
|
@ -10,6 +10,7 @@ registry_address = 0xe3e3431BF25b06166513019Ed7B21598D27d05dC
|
|||||||
[meta]
|
[meta]
|
||||||
url = https://meta.sarafu.network
|
url = https://meta.sarafu.network
|
||||||
http_origin =
|
http_origin =
|
||||||
|
auth_token =
|
||||||
|
|
||||||
[rpc]
|
[rpc]
|
||||||
provider = https://rpc.sarafu.network
|
provider = https://rpc.sarafu.network
|
||||||
|
@ -10,7 +10,7 @@ registry_address = 0x47269C43e4aCcA5CFd09CB4778553B2F69963303
|
|||||||
[meta]
|
[meta]
|
||||||
url = https://meta.sarafu.network
|
url = https://meta.sarafu.network
|
||||||
http_origin =
|
http_origin =
|
||||||
|
auth_token =
|
||||||
[rpc]
|
[rpc]
|
||||||
provider = https://rpc.sarafu.network
|
provider = https://rpc.sarafu.network
|
||||||
|
|
||||||
|
@ -4,8 +4,12 @@ import logging
|
|||||||
import os
|
import os
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
# External imports
|
||||||
from chainlib.chain import ChainSpec
|
from chainlib.chain import ChainSpec
|
||||||
from chainlib.cli.config import Config
|
from chainlib.cli.config import Config
|
||||||
|
from cic_types.ext.metadata import MetadataRequestsHandler
|
||||||
|
from cic_types.ext.metadata.signer import Signer as MetadataSigner
|
||||||
|
|
||||||
# Local Modules
|
# Local Modules
|
||||||
from cic.contract.components.attachment import Attachment
|
from cic.contract.components.attachment import Attachment
|
||||||
from cic.contract.components.meta import Meta
|
from cic.contract.components.meta import Meta
|
||||||
@ -15,9 +19,7 @@ from cic.contract.helpers import init_writers_from_config
|
|||||||
from cic.contract.network import Network
|
from cic.contract.network import Network
|
||||||
from cic.contract.processor import ContractProcessor
|
from cic.contract.processor import ContractProcessor
|
||||||
from cic.writers import HTTPWriter, KeyedWriterFactory, MetadataWriter
|
from cic.writers import HTTPWriter, KeyedWriterFactory, MetadataWriter
|
||||||
# external imports
|
|
||||||
from cic_types.ext.metadata import MetadataRequestsHandler
|
|
||||||
from cic_types.ext.metadata.signer import Signer as MetadataSigner
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -146,9 +148,12 @@ def deploy_contract(
|
|||||||
output_writer_path_meta = output_directory
|
output_writer_path_meta = output_directory
|
||||||
|
|
||||||
metadata_endpoint = config.get("META_URL")
|
metadata_endpoint = config.get("META_URL")
|
||||||
|
metadata_auth_token = config.get("META_AUTH_TOKEN")
|
||||||
|
|
||||||
if metadata_endpoint is not None:
|
if metadata_endpoint is not None:
|
||||||
MetadataRequestsHandler.base_url = metadata_endpoint
|
MetadataRequestsHandler.base_url = metadata_endpoint
|
||||||
|
MetadataRequestsHandler.auth_token = metadata_auth_token
|
||||||
|
|
||||||
MetadataSigner.gpg_path = "/tmp"
|
MetadataSigner.gpg_path = "/tmp"
|
||||||
MetadataSigner.key_file_path = config.get("AUTH_KEYFILE_PATH")
|
MetadataSigner.key_file_path = config.get("AUTH_KEYFILE_PATH")
|
||||||
MetadataSigner.gpg_passphrase = config.get("AUTH_PASSPHRASE")
|
MetadataSigner.gpg_passphrase = config.get("AUTH_PASSPHRASE")
|
||||||
|
@ -10,7 +10,7 @@ registry_address = 0xe3e3431BF25b06166513019Ed7B21598D27d05dC
|
|||||||
[meta]
|
[meta]
|
||||||
url = https://meta.sarafu.network
|
url = https://meta.sarafu.network
|
||||||
http_origin =
|
http_origin =
|
||||||
|
auth_token =
|
||||||
[auth]
|
[auth]
|
||||||
type = gnupg
|
type = gnupg
|
||||||
keyfile_path =
|
keyfile_path =
|
||||||
|
@ -90,7 +90,6 @@ def main():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logg.exception(e)
|
logg.exception(e)
|
||||||
sys.stderr.write("\033[;91m" + str(e) + "\033[;39m\n")
|
sys.stderr.write("\033[;91m" + str(e) + "\033[;39m\n")
|
||||||
argparser.print_help()
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
1191
poetry.lock
generated
1191
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -32,12 +32,13 @@ cic = 'cic.runnable.cic_cmd:main'
|
|||||||
[[tool.poetry.source]]
|
[[tool.poetry.source]]
|
||||||
name = "grassroots_"
|
name = "grassroots_"
|
||||||
url = "https://pip.grassrootseconomics.net/"
|
url = "https://pip.grassrootseconomics.net/"
|
||||||
default = true
|
secondary = true
|
||||||
|
|
||||||
[[tool.poetry.source]]
|
[[tool.poetry.source]]
|
||||||
name = "pypi_"
|
name = "pypi_"
|
||||||
url = "https://pypi.org/simple/"
|
url = "https://pypi.org/simple/"
|
||||||
secondary = true
|
default = true
|
||||||
|
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.8"
|
python = "^3.8"
|
||||||
@ -64,6 +65,7 @@ black = { version = "^22.1.0", allow-prereleases = true }
|
|||||||
eth_tester = "0.5.0b3"
|
eth_tester = "0.5.0b3"
|
||||||
py-evm = "0.3.0a20"
|
py-evm = "0.3.0a20"
|
||||||
rlp = "2.0.1"
|
rlp = "2.0.1"
|
||||||
|
mypy = "^0.961"
|
||||||
|
|
||||||
[tool.poetry.extras]
|
[tool.poetry.extras]
|
||||||
eth = [
|
eth = [
|
||||||
@ -93,4 +95,3 @@ build_command = "pip install poetry && poetry build"
|
|||||||
hvcs = "gitea"
|
hvcs = "gitea"
|
||||||
hvcs_domain = "git.grassecon.net"
|
hvcs_domain = "git.grassecon.net"
|
||||||
check_build_status = false
|
check_build_status = false
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user