Giter Club home page Giter Club logo

rarity-bot's Introduction

Rarity Bot

This bot will can do advanture for all of your Rarity Summonners as soon as possible and level up them automaticlly.

USE IT AT YOUR OWN RISK.

Under developmnet, please keep your clone/fork updated.

Requirements

Installation

  1. Clone this repo and cd into rarity-bot directory:

    git clone https://github.com/iRhonin/rarity-bot.git
    cd rarity-bot/
    
  2. Install dependencies using Poetry:

    poetry install
    poetry shell  # Enter into virtualenv

    Note: If you ran into fatal error: Python.h: No such file or directory error, you need to install python3-dev on Ubuntu (sudo apt install python3-dev). Check this link for the other distributions.

  3. Make a copy on .env_example and fill your PRIVATE_KEY and ADDRESS (PRIVATE_KEY is only needed to sign transactions, you can export it from the metamask):

    • cp .env_example .env
    • Set PRIVATE_KEY and ADDRESS (DO NOT SHARE YOUR PRIVATE KEY WITH ANYONE)
    • (Optional) Change other variables if needed

Usage

To send all of your summoners to advanture:

rarity adventure

Or only selected ones (If your summoners are 1234 and 4321):

rarity --summoner 1234 --summoner 4321 adventure

If you want to disable automatic level-up, use --no-lvlup like this:

rarity adventure --no-lvlup

To see all options:

rarity --help

If you had any issue, issue tab is for you, or you can find contacts on my profile.

rarity-bot's People

Contributors

irhonin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rarity-bot's Issues

execution reverted error for web3.py

hello, when i try run it
python

  • adventure_txn = self.contract.functions.adventure(self.summoner_id,).buildTransaction({'nonce': self.nonce()})

buildTransaction error

Support Summon Feature

Any idea to support auto summon, which invoke the contract.functions.summon function? I tried myself, but got a error of

sum_trx = contract.functions.summon(7).buildTransaction({
    "nonce": nonce()}
)

ContractLogicError: execution reverted: ERC721: mint to the zero address
---------------------------------------------------------------------------
ContractLogicError                        Traceback (most recent call last)
C:\Users\L84176~1\AppData\Local\Temp/ipykernel_33600/3901352448.py in <module>
----> 1 sum_trx = contract.functions.summon(7).buildTransaction({
      2     "nonce": nonce()}
      3 )
      4 contract.address

~\.conda\envs\rarity\lib\site-packages\web3\contract.py in buildTransaction(self, transaction)
   1077             )
   1078 
-> 1079         return build_transaction_for_function(
   1080             self.address,
   1081             self.web3,

~\.conda\envs\rarity\lib\site-packages\web3\contract.py in build_transaction_for_function(address, web3, function_name, transaction, contract_abi, fn_abi, *args, **kwargs)
   1646     )
   1647 
-> 1648     prepared_transaction = fill_transaction_defaults(web3, prepared_transaction)
   1649 
   1650     return prepared_transaction

~\.conda\envs\rarity\lib\site-packages\cytoolz\functoolz.pyx in cytoolz.functoolz.curry.__call__()

~\.conda\envs\rarity\lib\site-packages\web3\_utils\transactions.py in fill_transaction_defaults(web3, transaction)
    100             if callable(default_getter):
    101                 if web3 is not None:
--> 102                     default_val = default_getter(web3, transaction)
    103                 else:
    104                     raise ValueError("You must specify %s in the transaction" % key)

~\.conda\envs\rarity\lib\site-packages\web3\_utils\transactions.py in <lambda>(web3, tx)
     64     'value': 0,
     65     'data': b'',
---> 66     'gas': lambda web3, tx: web3.eth.estimate_gas(tx),
     67     'gasPrice': lambda web3, tx: web3.eth.generate_gas_price(tx) or web3.eth.gas_price,
     68     'chainId': lambda web3, tx: web3.eth.chain_id,

~\.conda\envs\rarity\lib\site-packages\web3\eth.py in estimate_gas(self, transaction, block_identifier)
    726         block_identifier: Optional[BlockIdentifier] = None
    727     ) -> Wei:
--> 728         return self._estimate_gas(transaction, block_identifier)
    729 
    730     def fee_history(

~\.conda\envs\rarity\lib\site-packages\web3\module.py in caller(*args, **kwargs)
     55             return LogFilter(eth_module=module, filter_id=err.filter_id)
     56         result_formatters, error_formatters, null_result_formatters = response_formatters
---> 57         result = w3.manager.request_blocking(method_str,
     58                                              params,
     59                                              error_formatters,

~\.conda\envs\rarity\lib\site-packages\web3\manager.py in request_blocking(self, method, params, error_formatters, null_result_formatters)
    185         """
    186         response = self._make_request(method, params)
--> 187         return self.formatted_response(response,
    188                                        params,
    189                                        error_formatters,

~\.conda\envs\rarity\lib\site-packages\web3\manager.py in formatted_response(self, response, params, error_formatters, null_result_formatters)
    165     ) -> Any:
    166         if "error" in response:
--> 167             apply_error_formatters(error_formatters, response)
    168             raise ValueError(response["error"])
    169         elif response['result'] in NULL_RESPONSES:

~\.conda\envs\rarity\lib\site-packages\web3\manager.py in apply_error_formatters(error_formatters, response)
     65 ) -> RPCResponse:
     66     if error_formatters:
---> 67         formatted_resp = pipe(response, error_formatters)
     68         return formatted_resp
     69     else:

~\.conda\envs\rarity\lib\site-packages\cytoolz\functoolz.pyx in cytoolz.functoolz.pipe()

~\.conda\envs\rarity\lib\site-packages\cytoolz\functoolz.pyx in cytoolz.functoolz.c_pipe()

~\.conda\envs\rarity\lib\site-packages\web3\_utils\method_formatters.py in raise_solidity_error_on_revert(response)
    564     # Geth case:
    565     if 'message' in response['error'] and response['error'].get('code', '') == 3:
--> 566         raise ContractLogicError(response['error']['message'])
    567 
    568     # Geth Revert without error message case:

ContractLogicError: execution reverted: ERC721: mint to the zero address

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.