Skip to content

function_call the call function generate two transactions? #13

@Yx8080

Description

@Yx8080
async def call_report_prices():
    try:
        accountId = ""
        privateKey = ""
        rpc = "https://rpc.mainnet.near.org"

        account = Account(accountId, privateKey, rpc)

        sender = "inscription.near"
        method_name = "inscribe"
        method_args = {
            "p": "nrc-20",
            "op": "mint",
            "tick": "neat",
            "amt": "100000000"
        }

        result = await account.function_call(sender, method_name, method_args)
        
        print("Transaction Hash:", result.transaction.hash)
        print("Transaction Hash url",result.transaction.url)
    except Exception as e:
        print(f"Error in call_report_prices: {e}")

async def main():
    for _ in range(2):
        await call_report_prices()
        await asyncio.sleep(1)

if __name__ == "__main__":
    asyncio.run(main())

Hey, I would like to ask if I can use the function_ When using the call function to execute the contract method, two identical hash transactions will appear. Firstly, the first transaction is sent to me by the system, and then I send it to the method I call, Inscribe. It will continue to throw rpc timeout errors. I want to know if the transaction sent to me by the system was generated by SDK?
https://nearblocks.io/zh-cn/address/0e82f1241097f1ffefb99a1a167cc91470700b0ac4b6a9870200514ef2dd43a7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions