Example #1
0
import argparse
import sys
from namebase_marketplace import marketplace
from script.script_c import Script

if __name__ == '__main__':
    parser = argparse.ArgumentParser(
        description='Accept offers over a predefined threshold.')

    parser.add_argument('--cookie',
                        required=True,
                        help='Input your namebase cookie (namebase-main).')
    parser.add_argument('--threshold',
                        dest='threshold',
                        required=True,
                        type=float,
                        help='Minimum amount to accept an offer.')

    args = parser.parse_args()
    marketplace = marketplace.Marketplace(namebase_cookie=args.cookie)
    script = Script(marketplace)
    offers = script.get_offers_to_accept(threshold=args.threshold)
from script.script_c import Script

if __name__ == '__main__':
    parser = argparse.ArgumentParser(
        description=
        'Consent offers on a specific domain. In order to disallow or not consent a domain to receive offers you just need to run the test without the --consent flag.'
    )

    parser.add_argument('--cookie',
                        required=True,
                        help='Input your namebase cookie (namebase-main).')
    parser.add_argument('--domain',
                        dest='domain',
                        required=True,
                        type=str,
                        help='Domain to consent offers or not.')
    parser.add_argument(
        '--consent',
        dest='consent',
        required=False,
        action='store_true',
        default=False,
        help=
        'Whether to consent offers or not. Use --consent to consent offers and dont use this flag to unconsent/disallow offers.'
    )

    args = parser.parse_args()
    marketplace = marketplace.Marketplace(namebase_cookie=args.cookie)
    script = Script(marketplace)
    script.consent_potential_offers(domain=args.domain, consent=args.consent)
import argparse
import sys
from namebase_marketplace import marketplace
from script.script_c import Script

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='EDIT DOMAIN DESCRIPTION.')

    parser.add_argument('--cookie',
                        required=True,
                        help='Input your namebase cookie (namebase-main).')
    parser.add_argument('--domain',
                        dest='domain',
                        required=True,
                        type=str,
                        help='Domain to change description.')
    parser.add_argument('--description',
                        dest='description',
                        nargs='+',
                        default=[],
                        required=True,
                        help='New description to put on domain')

    args = parser.parse_args()
    marketplace = marketplace.Marketplace(namebase_cookie=args.cookie)
    script = Script(marketplace)
    description = ' '.join(args.description)
    script.edit_domain_sale_description(domain=args.domain,
                                        description=description)
Example #4
0
        required='--enumerate' in sys.argv or '--all' in sys.argv,
        dest='price',
        type=float,
        help='Input the price of the domains to be put on marketplace')
    parser.add_argument(
        '--description',
        required='--enumerate' in sys.argv or '--all' in sys.argv,
        type=str,
        dest='description',
        nargs='+',
        default=[],
        help='Input the description of the domains to be put on marketplace')

    args = parser.parse_args()
    if args.enum and args.all:
        parser.error(
            "--ennumerate can't be spawned along --all. Use one or the other. Not together."
        )

    marketplace = marketplace.Marketplace(namebase_cookie=args.cookie)
    script = Script(marketplace)
    description = ' '.join(args.description)
    if args.all:
        script.sell_domains(price=args.price,
                            description=description,
                            custom_domains=False)
    elif args.enum:
        script.sell_domains(price=args.price,
                            description=description,
                            custom_domains=True,
                            domains=args.enum)
Example #5
0
import argparse
import sys
from namebase_marketplace import marketplace
from script.script_c import Script

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Send as many domains as you want through handshake chain domain.')

    parser.add_argument('--cookie', required=True,  help='Input your namebase cookie (namebase-main).')
    parser.add_argument('--domains', dest='domains', required=True, nargs="+",
                        help='Domains to send as: --domains domainexample1 domainexample2 domainexample3')
    parser.add_argument('--address', dest='address', required=True, type=str,
                        help='Whether to consent offers or not. Use --consent to consent offers and dont use this flag to unconsent/disallow offers.')

    args = parser.parse_args()
    marketplace = marketplace.Marketplace(namebase_cookie=args.cookie)
    script = Script(marketplace)
    address = args.address

    domains = args.domains
    print(domains)
    for domain in domains:
        res = script.send_domain_on_chain(domain=domain, hns_address=address)
        print (res)
Example #6
0
import argparse
import sys
from namebase_marketplace import marketplace
from script.script_c import Script

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Get all my domains I dont have on sale.')

    parser.add_argument('--cookie', required=True,  help='Input your namebase cookie (namebase-main).')

    args = parser.parse_args()
    marketplace = marketplace.Marketplace(namebase_cookie=args.cookie)
    script = Script(marketplace)
    domains = script.get_domains_not_on_sale()
    print(' '.join(domains))
import argparse
import sys
from namebase_marketplace import marketplace
from script.script_c import Script

if __name__ == '__main__':
    parser = argparse.ArgumentParser(
        description='REMOVE EVERY DOMAIN FROM MARKETPLACE.')

    parser.add_argument('--cookie',
                        required=True,
                        help='Input your namebase cookie (namebase-main).')
    parser.add_argument(
        '--remove',
        dest='remove',
        required=True,
        help=
        'By activating this flag, you agree to remove every domain you own from marketplace.'
    )

    args = parser.parse_args()
    marketplace = marketplace.Marketplace(namebase_cookie=args.cookie)
    script = Script(marketplace)
    script.remove_all_names_from_selling_page()