PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, July 28, 2022

[FIXED] How to remove Smart Contract in NEAR Protocol?

 July 28, 2022     blockchain, near, rust     No comments   

Issue

I am new to blockchain and Near Protocol. I have created 2 smart contracts on Near Protocol. The first one was successfully done but when I try to deploy the second one, I have deployed it but when I try to call a method ('increment' in this case) it gives error. I looked for the error and they say that this error executed because I tried to deploy another smart contract. So how can I remove the first one? Or can I? Or should I? Thanks. The error is below:

ServerTransactionError: {"index":0,"kind":{"ExecutionError":"Smart contract panicked: panicked at 'Cannot deserialize the contract state.: Custom { kind: InvalidData, error: \"Not all bytes read\" }

Solution

This depends. Are you running on testnet or mainnet and do you need to transfer any assets. You can only deploy 1 smart contract per wallet and it seems that you need to delete the wallet to remove the contract afaik

You can use near delete accountName.networkName



Answered By - JacksWastedLife
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing