Skip to content

Commit

Permalink
Merge pull request ethereum#52 from ethersphere/s/sworm-rc3-ens
Browse files Browse the repository at this point in the history
swarm/services/ens: update bin, go bindings:
  • Loading branch information
zelig authored Jul 13, 2016
2 parents baf88b3 + 38120c7 commit bdeef5c
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 20 deletions.
20 changes: 19 additions & 1 deletion swarm/services/ens/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Swarm ENS interface

The ABI and BIN files in this directory implement simple registrar and personal resolver contracts; they're used in tests, and can be used to deploy these contracts for your own purposes.
The ABI and BIN files in contract subdirectory implement simple registrar and personal resolver contracts; they're used in tests, and can be used to deploy these contracts for your own purposes.

The solidity source code can be found at [github.com/arachnid/ens/](https://github.com/arachnid/ens/).

The ABI and BIN files in the contract subdirectory were generated by

```shell
solc -o `pwd` --optimise --abi --bin OpenRegistrar.sol
solc -o `pwd` --optimise --abi --bin PersonalResolver.sol
```

using the .sol files in [revision 8b38b23a23100d5c325ae3fa24935f5ab93d61ba](https://github.com/Arachnid/ens/commit/8b38b23a23100d5c325ae3fa24935f5ab93d61ba)
with solc version 0.3.5-0/RelWithDebInfo-Linux/g++/Interpreter

The go bindings for ENS contracts are generated using `abigen` via the go generator:

```shell
godep go generate ./swarm/services/ens
```

see the preprocessor directives in leading comments of ens.go and ens_test.go
2 changes: 1 addition & 1 deletion swarm/services/ens/contract/OpenRegistrar.bin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
60606040526107c7806100126000396000f36060604052361561007f576000357c0100000000000000000000000000000000000000000000000000000000900480635b0fc9c3146100815780638021061c146100a2578063a16fdafa14610126578063a1f8f8f01461018e578063a9f2a1b2146101b8578063deb931a2146101e2578063edc0277c146102245761007f565b005b6100a0600480803590602001909190803590602001909190505061028e565b005b6100b86004808035906020019091905050610360565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156101185780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61014e6004808035906020019091908035906020019091908035906020019091905050610394565b604051808661ffff1681526020018581526020018463ffffffff1681526020018361ffff1681526020018281526020019550505050505060405180910390f35b6101b660048080359060200190919080359060200190919080359060200190919050506103d6565b005b6101e0600480803590602001909190803590602001909190803590602001909190505061055b565b005b6101f8600480803590602001909190505061066b565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61024360048080359060200190919080359060200190919050506106b6565b604051808561ffff1681526020018463ffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405180910390f35b600060008273ffffffffffffffffffffffffffffffffffffffff1614156102b457610002565b6000600050600084815260200190815260200160002060005090503373ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561032d57610002565b818160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b505050565b60206040519081016040528060008152602001506020604051908101604052806000815260200150905061038f565b919050565b6000600060006000600060007401000000000000000000000000000000000000000002881415156103ca576003945084506103cb565b5b939792965093509350565b600060008373ffffffffffffffffffffffffffffffffffffffff1614156103fc57610002565b600060005060008581526020019081526020016000206000509050600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561047657610002565b606060405190810160405280848152602001838152602001338152602001506000600050600086815260200190815260200160002060005060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff0219169083740100000000000000000000000000000000000000009004021790555060408201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055509050505b50505050565b600060008373ffffffffffffffffffffffffffffffffffffffff16141561058157610002565b6000600050600085815260200190815260200160002060005090503373ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156105fa57610002565b828160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550818160000160146101000a8154816bffffffffffffffffffffffff021916908374010000000000000000000000000000000000000000900402179055505b50505050565b60006000600050600083815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506106b1565b919050565b6000600060006000600060006000506000878152602001908152602001600020600050905060007401000000000000000000000000000000000000000002871415806107525750600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610762576003945084506107bd565b610e10935083508060000160149054906101000a90047401000000000000000000000000000000000000000002925082508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915081505b509295919450925056
60606040526103b1806100126000396000f3606060405236156100615760e060020a60003504635b0fc9c381146100635780638021061c14610085578063a16fdafa146100a2578063a1f8f8f0146100d5578063a9f2a1b2146100fa578063deb931a21461011f578063edc0277c14610145575b005b610061600435602435600081600160a060020a03166000141561028157610002565b6101956004356000606081905260a060405260809081525b919050565b610203600435602435604435600080808080600160a060020a0319881681146100ca57600394505b939792965093509350565b610061600435602435604435600082600160a060020a0316600014156102c157610002565b610061600435602435604435600082600160a060020a03166000141561033657610002565b610229600435600081815260208190526040902060010154600160a060020a031661009d565b6102466004356024356000818152602081905260408120819081908190600160a060020a031987168214158061018757506001810154600160a060020a031682145b1561038957600394506103a7565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156101f55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b50505061ffff919091166060908152608082905260a082815260c083905260e092909252f35b60408051600160a060020a03929092168252519081900360200190f35b61ffff93909316606090815263ffffffff929092166080908152600160a060020a03199190911660a052600160a060020a039290921660c052f35b828152602081905260409020600181015433600160a060020a039081169116146102aa57610002565b6001018054600160a060020a031916909117905550565b83815260208190526040812060018101549091600160a060020a03909116146102e957610002565b60018101805460c0604052606085905260808490523360a08190528354600160a060020a03199081168717600160a060020a031660a060020a808804021785559190911617905550505050565b838152602081905260409020600181015433600160a060020a0390811691161461035f57610002565b8054600160a060020a031916909217600160a060020a031660a060020a9182900490910217905550565b8054610e10945060a060020a808204029350600160a060020a031691505b509295919450925056
2 changes: 1 addition & 1 deletion swarm/services/ens/contract/OpenRegistrar.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
const OpenRegistrarABI = `[{"constant":false,"inputs":[{"name":"label","type":"bytes32"},{"name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"bytes32"}],"name":"getExtended","outputs":[{"name":"data","type":"bytes"}],"type":"function"},{"constant":true,"inputs":[{"name":"nodeId","type":"bytes12"},{"name":"qtype","type":"bytes32"},{"name":"index","type":"uint16"}],"name":"resolve","outputs":[{"name":"rcode","type":"uint16"},{"name":"rtype","type":"bytes16"},{"name":"ttl","type":"uint32"},{"name":"len","type":"uint16"},{"name":"data","type":"bytes32"}],"type":"function"},{"constant":false,"inputs":[{"name":"label","type":"bytes32"},{"name":"resolver","type":"address"},{"name":"nodeId","type":"bytes12"}],"name":"register","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"label","type":"bytes32"},{"name":"resolver","type":"address"},{"name":"nodeId","type":"bytes12"}],"name":"setResolver","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"label","type":"bytes32"}],"name":"getOwner","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[{"name":"nodeId","type":"bytes12"},{"name":"label","type":"bytes32"}],"name":"findResolver","outputs":[{"name":"rcode","type":"uint16"},{"name":"ttl","type":"uint32"},{"name":"rnode","type":"bytes12"},{"name":"raddress","type":"address"}],"type":"function"}]`

// OpenRegistrarBin is the compiled bytecode used for deploying new contracts.
const OpenRegistrarBin = `60606040526107c7806100126000396000f36060604052361561007f576000357c0100000000000000000000000000000000000000000000000000000000900480635b0fc9c3146100815780638021061c146100a2578063a16fdafa14610126578063a1f8f8f01461018e578063a9f2a1b2146101b8578063deb931a2146101e2578063edc0277c146102245761007f565b005b6100a0600480803590602001909190803590602001909190505061028e565b005b6100b86004808035906020019091905050610360565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156101185780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61014e6004808035906020019091908035906020019091908035906020019091905050610394565b604051808661ffff1681526020018581526020018463ffffffff1681526020018361ffff1681526020018281526020019550505050505060405180910390f35b6101b660048080359060200190919080359060200190919080359060200190919050506103d6565b005b6101e0600480803590602001909190803590602001909190803590602001909190505061055b565b005b6101f8600480803590602001909190505061066b565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61024360048080359060200190919080359060200190919050506106b6565b604051808561ffff1681526020018463ffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405180910390f35b600060008273ffffffffffffffffffffffffffffffffffffffff1614156102b457610002565b6000600050600084815260200190815260200160002060005090503373ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561032d57610002565b818160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b505050565b60206040519081016040528060008152602001506020604051908101604052806000815260200150905061038f565b919050565b6000600060006000600060007401000000000000000000000000000000000000000002881415156103ca576003945084506103cb565b5b939792965093509350565b600060008373ffffffffffffffffffffffffffffffffffffffff1614156103fc57610002565b600060005060008581526020019081526020016000206000509050600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561047657610002565b606060405190810160405280848152602001838152602001338152602001506000600050600086815260200190815260200160002060005060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff0219169083740100000000000000000000000000000000000000009004021790555060408201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055509050505b50505050565b600060008373ffffffffffffffffffffffffffffffffffffffff16141561058157610002565b6000600050600085815260200190815260200160002060005090503373ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156105fa57610002565b828160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550818160000160146101000a8154816bffffffffffffffffffffffff021916908374010000000000000000000000000000000000000000900402179055505b50505050565b60006000600050600083815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506106b1565b919050565b6000600060006000600060006000506000878152602001908152602001600020600050905060007401000000000000000000000000000000000000000002871415806107525750600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610762576003945084506107bd565b610e10935083508060000160149054906101000a90047401000000000000000000000000000000000000000002925082508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915081505b509295919450925056`
const OpenRegistrarBin = `606060405261083b806100126000396000f36060604052361561007f576000357c0100000000000000000000000000000000000000000000000000000000900480635b0fc9c3146100815780638021061c146100a2578063a16fdafa14610126578063a1f8f8f0146101a5578063a9f2a1b2146101cf578063deb931a2146101f9578063edc0277c1461023b5761007f565b005b6100a060048080359060200190919080359060200190919050506102bc565b005b6100b86004808035906020019091905050610392565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156101185780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61014e60048080359060200190919080359060200190919080359060200190919050506103c6565b604051808661ffff168152602001856fffffffffffffffffffffffffffffffff191681526020018463ffffffff1681526020018361ffff168152602001826000191681526020019550505050505060405180910390f35b6101cd600480803590602001909190803590602001909190803590602001909190505061041f565b005b6101f760048080359060200190919080359060200190919080359060200190919050506105ac565b005b61020f60048080359060200190919050506106c0565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61025a600480803590602001909190803590602001909190505061070f565b604051808561ffff1681526020018463ffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff191681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405180910390f35b600060008273ffffffffffffffffffffffffffffffffffffffff1614156102e257610002565b600060005060008460001916815260200190815260200160002060005090503373ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561035f57610002565b818160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b505050565b6020604051908101604052806000815260200150602060405190810160405280600081526020015090506103c1565b919050565b60006000600060006000600074010000000000000000000000000000000000000000028873ffffffffffffffffffffffffffffffffffffffff191614151561041357600394508450610414565b5b939792965093509350565b600060008373ffffffffffffffffffffffffffffffffffffffff16141561044557610002565b60006000506000856000191681526020019081526020016000206000509050600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156104c357610002565b60606040519081016040528084815260200183815260200133815260200150600060005060008660001916815260200190815260200160002060005060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff0219169083740100000000000000000000000000000000000000009004021790555060408201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055509050505b50505050565b600060008373ffffffffffffffffffffffffffffffffffffffff1614156105d257610002565b600060005060008560001916815260200190815260200160002060005090503373ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561064f57610002565b828160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550818160000160146101000a8154816bffffffffffffffffffffffff021916908374010000000000000000000000000000000000000000900402179055505b50505050565b6000600060005060008360001916815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061070a565b919050565b6000600060006000600060006000506000876000191681526020019081526020016000206000509050600074010000000000000000000000000000000000000000028773ffffffffffffffffffffffffffffffffffffffff19161415806107c65750600073ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b156107d657600394508450610831565b610e10935083508060000160149054906101000a90047401000000000000000000000000000000000000000002925082508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915081505b509295919450925056`

// DeployOpenRegistrar deploys a new Ethereum contract, binding an instance of OpenRegistrar to it.
func DeployOpenRegistrar(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *OpenRegistrar, error) {
Expand Down
Loading

0 comments on commit bdeef5c

Please sign in to comment.