Is there and example contract on NEAR testnet which I can call to understand the workflow?
All tutorials show how to create a smart contract but I do not want to create one, instead I want to call a function on a smart contract for learning purposes.
Related
I am facing an odd case where I am calling a view method in a smart contract with the correct address and ABI but am getting a reversion from the contract itself when it's being called through a library such as web3 from a frontend web application.
However, when trying on remix for example, with the same contract and method and parameters and address, the method is working.
Can anyone provide some insight into this?
Had to use .call({from: userAddress}) instead of just .call()
I can't figure out if i need to Deploy a smart contract for each transfer? or can 1 smart contract serve several transactions? Thanks ahead
You don't need to deploy another smart contract to transfer NFTs.
Info about each token ownership is stored in its collection contract. So you just need to execute the safeTransferFrom() function on the collection contract from the current owner address, passing it following params:
current owner (_from)
receiver (_to)
token ID (_tokenId)
There are several ways to execute the function from a regular (non-contract) address, for example using the UI of EtherScan/BSCScan under the Contract -> Write Contract section on the detail page of the collection contract address.
Note: All assuming the collection contract follows the ERC-721 standard.
I want a solidity contract to compile and deploy in remix.ethereum
the contract code I used brings always errors!
Error message:
This contract may be abstract, not implement an abstract parent’s methods completely or not invoke an inherited contract’s constructor correctly.
I want to use a new contract to verify and publish my tokens.
can you help me pls with a new contract that works with a remix and verifying etherscan?
regards
Based on the error message, you are trying to deploy the ERC20Interface instead of the contract x.
The solution is simple in Remix: Chose the correct contract to deploy from the selectbox.
I have been working on ERC20 token development. My code is written using solidity and zeppelin frameworks.
So far I have used the test networks like Rinkeby, Ropsten to deploy and test all the ERC20 methods. Last night, I have to deploy the smart contract in the mainnet where 10000000 tokens had to be deployed but I deployed only 1000000 (missed a zero).
As it is deployed in the mainnet, mint is the only way to top up the initial amount instead of redeploying. Mint is achievable using remix by removing the internal keyword in the mint method. But it requires to redeploy the smart contract in order to use mint method, which customer would not agree to redo the same.
The only way I think is to use web3js API to achieve the same. But there are no content given in the web3js document to how to pragmatically mint (to top up the initial amount).
If any of you have faced a similar situation, please let me know how you tackled it.
Thanks,
Sriram
The mint using web3 would be just a call to the contract function just like from remix, nothing special. All you would have to do would be to call the function. But since this function internal you cannot call it directly not from remix, not from web3, not from any other library. To put it simply if you cannot call the function from remix you cannot do it from web3 either. Web3 offers nothing more than remix in terms access rights to the contract.
I want to create a crowdsale token contract similar to EOS. I am new to crowdsale token contract. I get the source code from etherscan.io. They are EOSTokenContract, EOSCrowdsale, EOS-Owner. I want to know how did they deployed their smart contract. Through truffle? or what kind of framework to deploy their smart contract.
Can i deploy a similar crowdsale contract using those three files?
My suggestion is to take a look to OpenZeppelin, they provide a good library to develop Smart Contracts, with good tutorials and guides and a specific focus on crowdsale contracts.
You can start from their basic example "How To Create Token and Initial Coin Offering Contracts Using Truffle + OpenZeppelin"
In EOS contract is written in C++ language while in ethereum in solidity. SO you can't deploy using truffle because it's not yet developed for EOS.