I am using the web3swift library and I managed to do some transactions, mostly gets (balanceOf, owner etc). I read the whole readme(documentation), but I am not quite sure, can we use this library to call functions from our custom smart contracts? For example I have store smart contract and I want to call the buy function from it? I saw that we can transfer eth and ERC20 tokens but that is not enough for me. Any help on this?
Interacting with custom smart contract using web3swift
1.1k Views Asked by maptuhec At
1
There are 1 best solutions below
Related Questions in ETHEREUM
- Gas estimation failed | Returned error: gas required exceeds allowance (16966)
- Historical data scrapping / collection for Ethereum
- IERC20 token.transfer always fails when called from within smart contract
- Installation Private Blockchain
- Call Uniswap V3 QuoterV2 `quoteExactOutput()` function with dart (flutter)
- Can I swap with 1inch swap apis with forked hardhart?
- Ethereum: why are the addresses still generated from the uncompressed public keys?
- WEB3.PHP Contract getEvents
- Ethereum: how to generate a valid address from the public key?
- Merkle Tree that should handle both odd and even numbers of leaves
- Uniswap v3 flashloan remainging balance not correct after paying off the loan
- Fetching Approved USDT Amount from User to Admin Wallet Using Etherscan USDT Contract Code
- How data saved using a smart contract is stored in the Ethereum blockchain
- Understanding the process of setting up a Geth client on a private network and running a DApp
- uniswapRouter.getAmountsOut returns less value of token B than present in reverses
Related Questions in SMARTCONTRACTS
- Gas estimation failed | Returned error: gas required exceeds allowance (16966)
- This is the solidity code to list nft in marketplace after minting but while calling makeItem function Error is showing that Faliled to estimate gas
- how i need place arg in code for funtion send?
- Uniswap v3 flashloan remainging balance not correct after paying off the loan
- Blind signing when trying to send USDT over Arbitrum network
- connecting trust wallet mobile to my dapp
- Solidity Smart Contract & Hedera Hashgraph Javascript SDK Integration
- Trying to interact with a contract using is function selector, how do i get the block hash?
- a sales tax on stonfi or dedust (The Open Network)
- After issuing the NFT smart contract I made, it cannot be viewed by OpenSea
- no scripts folder in hardhat framework instead there's ignition folder with a subfolder named modules
- Ensure smart contract integrity in web applications
- How to generate multi hop swap path with ethers.js?
- How does the fee get calculated in hardhat?
- Function for returning a wallet balance
Related Questions in WEB3SWIFT
- section __text/__text address out of range file for architecture x86_64 while integrating web3swift MercuryProtocol
- How to conduct an ETH transfer from web3swift?
- How to get ETH transaction status from web3swift?
- Web3 Swift Call Contract using Skywinder wrapper
- How to interact with Smart Contract deployed on Blockchain from Swift app
- Web3Swift Interaction with custom ABI
- Smart Contract Event Parsing With Web3swift and interacting with it swift
- Sign any message with the user’s private key and verify the signature on Ethereum
- Export mnemonics function in web3swift library
- Interacting with custom smart contract using web3swift
- Can't import Web3. swift in Xcode project
- How to sign personal message with the personal extension of web3?
- How to use custom json contract with web3swift
- Compile error when trying to import web3swift
- How to create raw transaction using web3swift?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Yes, you can call any function on your custom smart contract. Here is an example.
let ethContractAddress = EthereumAddress("0xfa28eC7198028438514b49a3CF353BcA5541ce1d")!You can get the ABI of your contract directly from Remix IDE.callmethod is for methods withviewidentifier in solidity, so you won't pay for it and method send() is for the methods of smart contract that should be paid with gas for execution.I hope my answer will help you! If something is still unclear - feel free to ask! :)