Web3.swift
Web3.swift copied to clipboard
A pure swift Ethereum Web3 library
/Pods/Web3/Web3/Classes/Core/Toolbox/Data+BytesConvertible.swift:10:1: Unavailable initializer 'init(bytes:)' was used to satisfy a requirement of protocol 'BytesInitializable'
## Overview This PR adds an `enum`, `EthereumChain`, that is a type-safe wrapper for the `chainId`, as described in EIP155. ## Detailed This PR also makes the chainId parameters mandatory,...
I have created a private network that can communicate between 2 computers on the same network. Executing some contracts. How do I connect this module with my own private network?...
Is it possible to get the list of all past (historical) transactions quickly? As I can see now - I can only get the count of transactions for account (using...
Hello, I have a simple smart contract about read and write some value. I can read my “owner” value successfully, but can not write value to the “owner”. When I...
We can get a list of events and methods when we using class DynamicContract in your example, but is there an efficient way to call these methods and interact with...
`let contractJsonABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]".data(using: .utf8)! let contract = try! web3.eth.Contract(json: contractJsonABI, abiKey: nil, address: contractAddress) try! contract["balanceOf"]!(fromAddress).call(completion: { (response, error) in }) ` When I requested the balance through the...
Hey Ybrin, I am currently working with your example for dynamic contracts [(Boilertalk - Dynamic Contracts)](https://github.com/Boilertalk/Web3.swift#dynamic-contracts) but I get an error when I am trying to load the contract. ```swift...
how to import wallet by keystore and password?
The DynamicContractTests always stop creating tests because of [this line](https://github.com/Boilertalk/Web3.swift/blob/master/Example/Tests/ContractTests/JSONContractTests.swift#L54). `contract.deploy` somehow always fails and because we just return there. We don't even notice when running the test suite. I...