aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi
Commit message (Collapse)AuthorAgeFilesLines
* all: gofmt -w -sFelix Lange2017-01-061-14/+14
|
* Merge pull request #3516 from fjl/types-drop-sign-ecdsaPéter Szilágyi2017-01-061-1/+1
|\ | | | | core/types: remove redundant SignECDSA wrappers, rename to SignTx
| * core/types: remove redundant SignECDSA wrappers, rename to SignTxFelix Lange2017-01-051-1/+1
| |
* | core/vm: move Log to core/typesFelix Lange2017-01-061-2/+2
|/ | | | | | | | This significantly reduces the dependency closure of ethclient, which no longer depends on core/vm as of this change. All uses of vm.Logs are replaced by []*types.Log. NewLog is gone too, the constructor simply returned a literal.
* core/vm: improved EVM run loop & instruction calling (#3378)Jeffrey Wilcke2017-01-051-1/+1
| | | | | | | | | | | | | | | The run loop, which previously contained custom opcode executes have been removed and has been simplified to a few checks. Each operation consists of 4 elements: execution function, gas cost function, stack validation function and memory size function. The execution function implements the operation's runtime behaviour, the gas cost function implements the operation gas costs function and greatly depends on the memory and stack, the stack validation function validates the stack and makes sure that enough items can be popped off and pushed on and the memory size function calculates the memory required for the operation and returns it. This commit also allows the EVM to go unmetered. This is helpful for offline operations such as contract calls.
* accounts/abi: add support for function types (#3405)RJ2017-01-054-4/+24
|
* accounts, core, crypto, internal: use normalised V during signature handling ↵Péter Szilágyi2017-01-051-1/+1
| | | | | | | | | (#3455) To address increasing complexity in code that handles signatures, this PR discards all notion of "different" signature types at the library level. Both the crypto and accounts package is reduced to only be able to produce plain canonical secp256k1 signatures. This makes the crpyto APIs much cleaner, simpler and harder to abuse.
* accounts/abi: add support for "anonymous" and "indexed" for events (#3464)bas-vk2016-12-224-20/+61
|
* Merge pull request #3403 from VoR0220/fixedPointsAbiPéter Szilágyi2016-12-192-7/+85
|\ | | | | accounts/abi: prepare ABI to handle fixed point types
| * accounts/abi: clean up PR and add type parsing testsPéter Szilágyi2016-12-192-5/+82
| |
| * accounts/abi: prepare ABI to handle fixed point typesVoR02202016-12-191-5/+6
| | | | | | | | Signed-off-by: VoR0220 <rj@erisindustries.com>
* | core, core/vm: implemented a generic environment (#3348)Jeffrey Wilcke2016-12-061-1/+5
|/ | | | | | | | Environment is now a struct (not an interface). This reduces a lot of tech-debt throughout the codebase where a virtual machine environment had to be implemented in order to test or run it. The new environment is suitable to be used en the json tests, core consensus and light client.
* accounts/abi/bind, mobile: review fixes and android testsPéter Szilágyi2016-11-152-8/+12
|
* mobile: initial wrappers for mobile supportPéter Szilágyi2016-11-143-12/+266
|
* core/types, params: EIP#155Jeffrey Wilcke2016-11-134-16/+15
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-3/+6
| | | | | | | | | | | | | | | This commit implements EIP158 part 1, 2, 3 & 4 1. If an account is empty it's no longer written to the trie. An empty account is defined as (balance=0, nonce=0, storage=0, code=0). 2. Delete an empty account if it's touched 3. An empty account is redefined as either non-existent or empty. 4. Zero value calls and zero value suicides no longer consume the 25k reation costs. params: moved core/config to params Signed-off-by: Jeffrey Wilcke <jeffrey@ethereum.org>
* all: update license informationFelix Lange2016-11-093-3/+3
|
* accounts/abi: differentiate between static and dynamic arrays (#3121)RJ2016-11-044-26/+64
| | | | | solves #3119 Signed-off-by: VoR0220 <rj@erisindustries.com>
* internal/ethapi: add personal_sign and fix eth_sign to hash message (#2940)bas-vk2016-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | This commit includes several API changes: - The behavior of eth_sign is changed. It now accepts an arbitrary message, prepends the well-known string \x19Ethereum Signed Message:\n<length of message> hashes the result using keccak256 and calculates the signature of the hash. This breaks backwards compatability! - personal_sign(hash, address [, password]) is added. It has the same semantics as eth_sign but also accepts a password. The private key used to sign the hash is temporarily unlocked in the scope of the request. - personal_recover(message, signature) is added and returns the address for the account that created a signature.
* core/state: implement reverts by journaling all changesFelix Lange2016-10-061-2/+4
| | | | | | | | | | This commit replaces the deep-copy based state revert mechanism with a linear complexity journal. This commit also hides several internal StateDB methods to limit the number of ways in which calling code can use the journal incorrectly. As usual consultation and bug fixes to the initial implementation were provided by @karalabe, @obscuren and @Arachnid. Thank you!
* accounts/abi: fix typo in the comment (dummy commit)Péter Szilágyi2016-09-261-1/+1
|
* core/state: track all accounts in canon stateFelix Lange2016-09-261-5/+2
| | | | | This change introduces a global, per-state cache that keeps account data in the canon state. Thanks to @karalabe for lots of fixes.
* accounts/abi/bind: add utilities for waiting on transactionsFelix Lange2016-08-234-15/+267
| | | | | | | | | The need for these functions comes up in code that actually deploys and uses contracts. As of this commit, they can be used with both SimulatedBackend and ethclient. SimulatedBackend gains some additional methods in the process and is now safe for concurrent use.
* accounts/abi/bind: use ethereum interfacesFelix Lange2016-08-223-175/+157
| | | | | | | | | | | | | | | | | | | | | | | | | In this commit, contract bindings and their backend start using the Ethereum Go API interfaces offered by ethclient. This makes ethclient a suitable replacement for the old remote backend and gets us one step closer to the final stable Go API that is planned for go-ethereum 1.5. The changes in detail: * Pending state is optional for read only contract bindings. BoundContract attempts to discover the Pending* methods via an interface assertion. There are a couple of advantages to this: ContractCaller is just two methods and can be implemented on top of pretty much anything that provides Ethereum data. Since the backend interfaces are now disjoint, ContractBackend can simply be declared as a union of the reader and writer side. * Caching of HasCode is removed. The caching could go wrong in case of chain reorganisations and removing it simplifies the code a lot. We'll figure out a performant way of providing ErrNoCode before the 1.5 release. * BoundContract now ensures that the backend receives a non-nil context with every call.
* accounts/abi/bind/backends: remove nil and remote backendsFelix Lange2016-08-214-203/+10
| | | | | | | | | | | | The remote backend is superseded by ethclient. The nil backend's stated purpose was to enable testing of accounts/abi/bind. None of its methods actually worked. A much simpler way to get a crashing backend is to simply pass nil as the backend. With a one-line change to the generator (removing two explicit interface assertions), passing nil actually works. Removing these backends means that less changes are required later.
* rpc: add new client, use it everywhereFelix Lange2016-07-231-142/+18
| | | | | | The new client implementation supports concurrent requests, subscriptions and replaces the various ad hoc RPC clients throughout go-ethereum.
* accounts, core, eth: pass chain config for chain maker to test DAOPéter Szilágyi2016-07-151-2/+2
|
* core: added CheckNonce() to Message interfacezsfelfoldi2016-07-111-1/+2
|
* Merge pull request #2159 from zsfelfoldi/light-backendPéter Szilágyi2016-06-305-48/+77
|\ | | | | eth: separate common and full node-specific API and backend service
| * eth: separate common and full node-specific API and backend servicezsfelfoldi2016-06-165-48/+77
| |
* | accounts/abi: fix uint64 upper range encoding.Péter Szilágyi2016-06-102-21/+33
|/
* accounts/abi: Negative numbers not properly converted in ABI encodingThomas Bocek2016-06-064-64/+10
| | | | | | | | | | | | | | | When converting a negative number e.g., -2, the resulting ABI encoding should look as follows: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe. However, since the check of the type is for an uint instead of an int, it results in the following ABI encoding: 0101010101010101010101010101010101010101010101010101010101010102. The Ethereum ABI (https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) says, that signed integers are stored in two's complement which should be of the form ffffff.... and not 01010101..... for e.g. -1. Thus, I removed the type check in numbers.go as well as the function S256 as I don't think they are correct. Or maybe I'm missing something?
* accounts/abi/bind, eth: rely on getCode for sanity checks, not estimate and callPéter Szilágyi2016-05-205-6/+101
|
* accounts/abi: fix abi test for go vet...Péter Szilágyi2016-05-121-2/+2
|
* accounts/abi/bind: fix multi-value anonymous unmarshallingPéter Szilágyi2016-05-122-3/+37
|
* accounts/abi: fixed unpacking in to already slice interfacesJeffrey Wilcke2016-05-113-31/+94
| | | | | | | | | | | | | | | | Previously it was assumed that wheneven type `[]interface{}` was given that the interface was empty. The abigen rightfully assumed that interface slices which already have pre-allocated variable sets to be assigned. This PR fixes that by checking that the given `[]interface{}` is larger than zero and assigns each value using the generic `set` function (this function has also been moved to abi/reflect.go) and checks whether the assignment was possible. The generic assignment function `set` now also deals with pointers (useful for interface slice mentioned above) by dereferencing the pointer until it finds a setable type.
* release, all: integrate the release service into gethPéter Szilágyi2016-05-021-2/+3
|
* Merge pull request #2435 from obscuren/abi-array-fixesPéter Szilágyi2016-04-288-362/+733
|\ | | | | accounts/abi: refactored ABI package
| * accounts/abi: fixed string and fixed size bytes packingJeffrey Wilcke2016-04-286-85/+137
| |
| * accounts/abi: added unpacking "anything" in to interface{}Jeffrey Wilcke2016-04-282-0/+11
| |
| * accounts/abi: fixed strict go-like unpackingJeffrey Wilcke2016-04-282-27/+158
| |
| * accouns/abi: refactored ABI packageJeffrey Wilcke2016-04-208-314/+491
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored the abi package parsing and type handling. Relying mostly on package reflect as opposed to most of our own type reflection. Our own type reflection is still used however for cases such as Bytes and FixedBytes (abi: bytes•). This also inclused several fixes for slice handling of arbitrary and fixed size for all supported types. This also further removes implicit type casting such as assigning, for example `[2]T{} = []T{1}` will fail, however `[2]T{} == []T{1, 2}` (notice assigning *slice* to fixed size *array*). Assigning arrays to slices will always succeed if they are of the same element type. Incidentally also fixes #2379
* | accounts/abi/bind, eth: add contract non-existent errorPéter Szilágyi2016-04-274-4/+60
|/
* accounts/abi/bind/backends: estimate needed gas, not usedPéter Szilágyi2016-04-151-1/+1
|
* all: fix go vet warningsFelix Lange2016-04-151-5/+5
|
* all: update license informationFelix Lange2016-04-151-0/+16
|
* accounts, crypto: move keystore to package accountsFelix Lange2016-04-122-28/+23
| | | | | | | | | | The account management API was originally implemented as a thin layer around crypto.KeyStore, on the grounds that several kinds of key stores would be implemented later on. It turns out that this won't happen so KeyStore is a superflous abstraction. In this commit crypto.KeyStore and everything related to it moves to package accounts and is unexported.
* accounts/abi/bind: support generating bindings for various arraysPéter Szilágyi2016-04-052-16/+67
|
* abi: removed implicit type casting & refactored type parsingJeffrey Wilcke2016-04-053-53/+80
|
* abi: accept output slices of all supported typesJeffrey Wilcke2016-04-053-5/+143
|
* abi: accept input slices of all supported typesJeffrey Wilcke2016-04-055-145/+106
|
* Merge pull request #2405 from karalabe/abigen-default-methodsJeffrey Wilcke2016-04-013-5/+102
|\ | | | | accounts/abi/bind: surface raw wrappers to access low level ops
| * accounts/abi/bind: surface raw wrappers to access low level opsPéter Szilágyi2016-04-013-5/+102
| |
* | accounts/a/b/backends, core: chain maker homestead block set to 0Jeffrey Wilcke2016-04-011-2/+1
| | | | | | | | | | | | | | The chain maker and the simulated backend now run with a homestead phase beginning at block 0 (i.e. there's no frontier). This commit also fixes up #2388
* | core: added basic chain configurationJeffrey Wilcke2016-04-011-3/+8
|/ | | | | | | | | Added chain configuration options and write out during genesis database insertion. If no "config" was found, nothing is written to the database. Configurations are written on a per genesis base. This means that any chain (which is identified by it's genesis hash) can have their own chain settings.
* accounts/abi/bind: support account slices, drop hash typePéter Szilágyi2016-03-311-2/+2
|
* accounts/abi/bind: merge all tests into a single suitePéter Szilágyi2016-03-311-22/+22
|
* accounts/abi/bind: use anonymous ephemeral call result structsPéter Szilágyi2016-03-311-15/+10
|
* accounts/abi/bind, cmd/abigen: dedup structs, exclude patternsPéter Szilágyi2016-03-261-6/+6
|
* accounts/abi/bind: fix double pointer in generated codePéter Szilágyi2016-03-252-4/+36
|
* accounts/abi/bind, cmd/abigen: port to templates, bind to solidityPéter Szilágyi2016-03-249-428/+530
|
* accounts/abi/bind: constructor, auth utils and various backendsPéter Szilágyi2016-03-249-263/+723
|
* accounts/abi/bind, cmd/abigen: Go API generator around an EVM ABIPéter Szilágyi2016-03-246-41/+855
|
* Merge pull request #2348 from obscuren/abi-variable-inputPéter Szilágyi2016-03-174-31/+193
|\ | | | | accounts/abi: Fixed bytes input accept []byte and variable input support
| * accounts/abi: Fixed bytes input accept []byte and variable input supportJeffrey Wilcke2016-03-154-31/+193
| | | | | | | | | | | | | | | | | | Fixed up `[]byte` slice support such that `function print(bytes input)` accepts `[]byte` as input and treats it as 1 element rather than a slice of multiple elements. Added support for variable length input parameters like `bytes` and `strings`.
* | accounts/abi: handle the "constant" modifier for functionsPéter Szilágyi2016-03-162-9/+12
|/
* all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()Ricardo Catalinas Jiménez2016-02-224-9/+9
| | | | As we aren't really using the standarized SHA-3
* accounts/abi: support for typed arrayJeffrey Wilcke2016-02-152-43/+114
| | | | | Added support for fixed size and arbitrary length byte arrays to be marshallable in fixed size (typed) byte slices.
* accounts/abi: fixed return tuple and string, bytes return type parsingJeffrey Wilcke2016-02-113-30/+363
| | | | | | | | | | | | | Removed old unmarshalling of return types: `abi.Call(...).([]byte)`. This is now replaced by a new syntax: ``` var a []byte err := abi.Call(&a, ...) ``` It also addresses a few issues with Bytes and Strings and can also handle both fixed and arbitrary sized byte slices, including strings.
* account/abi: implements event parsingJeffrey Wilcke2016-02-026-31/+174
| | | | | | Implementation of basic event parsing and its input types. This separates methods and events and fixes an issue with go type parsing and validation.
* accounts/abi: added output parsing & added call mechanismJeffrey Wilcke2015-11-256-88/+243
| | | | Added calling mechanism and return value parsing
* accounts/abi: ABI fixes & added typesJeffrey Wilcke2015-10-303-21/+80
| | | | | | | Changed field `input` to new `inputs`. Addad Hash and Address as input types. Added bytes[N] and N validation
* all: fix license headers one more timeFelix Lange2015-07-246-6/+6
| | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-236-24/+24
| | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* all: update license informationFelix Lange2015-07-076-0/+96
|
* Moved ethutil => commonobscuren2015-03-162-10/+10
|
* removedobscuren2015-03-081-106/+0
|
* Implemented contract ABIobscuren2015-01-277-0/+969