diff --git a/contracts/District.sol b/contracts/District.sol index 1dc073c..4f71067 100644 --- a/contracts/District.sol +++ b/contracts/District.sol @@ -4,7 +4,8 @@ import "./RegistryEntry.sol"; import "./StakeBank.sol"; import "./proxy/Forwarder2.sol"; import "./DistrictChallenge.sol"; -import "./KitDistrict.sol"; +import "@aragon/os/contracts/lib/ens/ENS.sol"; +import "@aragon/os/contracts/lib/ens/PublicResolver.sol"; /** @@ -18,7 +19,7 @@ import "./KitDistrict.sol"; contract District is RegistryEntry { StakeBank public stakeBank; - KitDistrict public constant kitDistrict = KitDistrict(0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa); + ENS public constant ens = ENS(0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa); /** * @dev IPFS hash of file that contains all data from form fields @@ -33,23 +34,31 @@ contract District is RegistryEntry { * @param _creator Creator of a district * @param _version Version of District contract * @param _metaHash IPFS hash of data related to a district - * @param _aragonId ENS name registered as .aragonid.eth + * @param _ensNode Namehash of the ENS name registered by the sender + * @param _ensName ENS name registered by the sender */ function construct( address _creator, uint _version, bytes _metaHash, - string _aragonId + bytes32 _ensNode, + string _ensName ) public { super.construct(_creator, _version); + // requires creator is owner of ENS domain and it does not have any linked snapshot + require(_creator == ens.owner(_ensNode)); + address resolverAddr = ens.resolver(_ensNode); + if (resolverAddr != address(0x0)) { + PublicResolver resolver = PublicResolver(resolverAddr); + require(bytes(resolver.text(_ensNode, "snapshot")).length == 0); + } stakeBank = StakeBank(new Forwarder2()); stakeBank.construct(); challengePeriodEnd = ~uint(0); metaHash = _metaHash; - Kernel aragonDao = kitDistrict.createDAO(_aragonId, MiniMeToken(stakeBank), _creator); - registry.fireDistrictConstructedEvent(version, creator, metaHash, deposit, challengePeriodEnd, address(stakeBank), address(aragonDao), _aragonId); + registry.fireDistrictConstructedEvent(version, creator, metaHash, deposit, challengePeriodEnd, address(stakeBank), _ensName); } /** diff --git a/contracts/DistrictFactory.sol b/contracts/DistrictFactory.sol index c425509..1b5d1bf 100644 --- a/contracts/DistrictFactory.sol +++ b/contracts/DistrictFactory.sol @@ -25,7 +25,8 @@ contract DistrictFactory is RegistryEntryFactory { function createDistrict( address _creator, bytes _metaHash, - string _aragonId + bytes32 _ensNameNode, + string _ensName ) public notEmergency @@ -35,7 +36,8 @@ contract DistrictFactory is RegistryEntryFactory { _creator, version, _metaHash, - _aragonId + _ensNameNode, + _ensName ); } } diff --git a/contracts/Registry.sol b/contracts/Registry.sol index 379747e..c1e5a3d 100644 --- a/contracts/Registry.sol +++ b/contracts/Registry.sol @@ -19,7 +19,7 @@ contract Registry is DSAuth { event ChallengeCreatedEvent(address registryEntry, uint version, uint index, address challenger, uint commitPeriodEnd, uint revealPeriodEnd, uint rewardPool, bytes metaHash, uint timestamp); event ChallengerRewardClaimedEvent(address registryEntry, uint version, uint index, address challenger, uint amount, uint timestamp); event CreatorRewardClaimedEvent(address registryEntry, uint version, uint index, address creator, uint amount, uint timestamp); - event DistrictConstructedEvent(address registryEntry, uint version, address creator, bytes metaHash, uint deposit, uint challengePeriodEnd, address stakeBank, address aragonDao, string aragonId, uint timestamp); + event DistrictConstructedEvent(address registryEntry, uint version, address creator, bytes metaHash, uint deposit, uint challengePeriodEnd, address stakeBank, string ensName, uint timestamp); event DistrictStakeChangedEvent(address registryEntry, uint version, uint stakeId, uint dntTotalStaked, uint votingTokenTotalSupply, address staker, uint stakerDntStaked, uint stakerVotingTokenBalance, uint stakedAmount, bool isUnstake, uint timestamp); event DistrictMetaHashChangedEvent(address registryEntry, uint version, bytes metaHash, uint timestamp); event VotesReclaimedEvent(address registryEntry, uint version, uint index, address voter, uint amount, uint timestamp); @@ -155,13 +155,12 @@ contract Registry is DSAuth { uint deposit, uint challengePeriodEnd, address stakeBank, - address aragonDao, - string aragonId + string ensName ) public onlyRegistryEntry { - emit DistrictConstructedEvent(msg.sender, version, creator, metaHash, deposit, challengePeriodEnd, stakeBank, aragonDao, aragonId, now); + emit DistrictConstructedEvent(msg.sender, version, creator, metaHash, deposit, challengePeriodEnd, stakeBank, ensName, now); } function fireDistrictStakeChangedEvent(uint version, uint stakeId, uint dntTotalStaked, uint votingTokenTotalSupply, address staker, uint stakerDntStaked, uint stakerVotingTokenBalance, uint stakedAmount, bool isUnstake) public diff --git a/migrations/2_district_registry_migration.js b/migrations/2_district_registry_migration.js index bbcac37..9d0b8f2 100644 --- a/migrations/2_district_registry_migration.js +++ b/migrations/2_district_registry_migration.js @@ -2,7 +2,7 @@ const {copyContract, copy, smartContractsTemplate, encodeContractEDN, linkByteco const fs = require("fs"); const edn = require("jsedn"); const {env, smartContractsPath, parameters} = require("../truffle.js"); -const {registryPlaceholder, dntPlaceholder, forwarder1TargetPlaceholder, forwarder2TargetPlaceholder, minimeTokenFactoryPlaceholder, kitDistrictPlaceholder, zeroAddress, dsGuardANY, aragonENSNode} = require("./constants.js"); +const {registryPlaceholder, dntPlaceholder, forwarder1TargetPlaceholder, forwarder2TargetPlaceholder, minimeTokenFactoryPlaceholder, ensPlaceholder, zeroAddress, dsGuardANY, aragonENSNode} = require("./constants.js"); const namehash = require('eth-ens-namehash'); const web3Utils = require('web3-utils'); const sha3 = web3Utils.sha3; @@ -285,13 +285,13 @@ async function deploy_District(deployer, opts) { const districtChallenge = await DistrictChallenge.deployed(); const stakeBank = await StakeBank.deployed(); const districtRegistryForwarder = await DistrictRegistryForwarder.deployed(); - const kitDistrict = await KitDistrict.deployed(); + const ens = await getENS(); linkBytecode(District, dntPlaceholder, dnt.address); linkBytecode(District, registryPlaceholder, districtRegistryForwarder.address); linkBytecode(District, forwarder1TargetPlaceholder, districtChallenge.address); linkBytecode(District, forwarder2TargetPlaceholder, stakeBank.address); - linkBytecode(District, kitDistrictPlaceholder, kitDistrict.address); + linkBytecode(District, ensPlaceholder, ens.address); await deployer.deploy(District, Object.assign({}, opts, {gas: 6.2e6})); const district = await District.deployed(); @@ -378,6 +378,18 @@ async function deploy_ENS(deployer, opts) { assignContract(ens, "ENS", "ENS"); } +async function reg_ENS(name, ens, publicResolver, opts) { + var ensName = name + ".eth"; + console.log("Setting active account to be owner of " + ensName); + await ens.setSubnodeOwner(namehash.hash("eth"), sha3(name), opts.from, Object.assign({}, opts, {gas: 0.2e6})); + + console.log("Setting resolver for " + ensName); + await ens.setResolver(namehash.hash(ensName), publicResolver.address, Object.assign({}, opts, {gas: 0.2e6})); + + console.log("Setting resolving address for " + ensName); + await publicResolver.setAddr(namehash.hash(ensName), publicResolver.address, Object.assign({}, opts, {gas: 0.3e6})); +} + async function deploy_PublicResolver(deployer, opts) { if (!parameters.ENS) { console.log("Deploying ENS PublicResolver"); @@ -386,14 +398,11 @@ async function deploy_PublicResolver(deployer, opts) { await deployer.deploy(PublicResolver, ens.address, Object.assign({}, opts, {gas: 1.9e6})); const publicResolver = await PublicResolver.deployed(); - console.log("Setting active account to be owner of resolver.eth"); - await ens.setSubnodeOwner(namehash.hash("eth"), sha3("resolver"), opts.from, Object.assign({}, opts, {gas: 0.2e6})); - - console.log("Setting resolver for resolver.eth"); - await ens.setResolver(namehash.hash("resolver.eth"), publicResolver.address, Object.assign({}, opts, {gas: 0.2e6})); - - console.log("Setting resolving address for resolver.eth"); - await publicResolver.setAddr(namehash.hash("resolver.eth"), publicResolver.address, Object.assign({}, opts, {gas: 0.3e6})); + reg_ENS("resolver", ens, publicResolver, opts); + // register multiple domains for testing + for (var i = 0; i< 10;i++) { + reg_ENS(i + "resolver", ens, publicResolver, opts); + } assignContract(publicResolver, "PublicResolver", "public-resolver"); } diff --git a/migrations/constants.js b/migrations/constants.js index 2859eaf..324012a 100644 --- a/migrations/constants.js +++ b/migrations/constants.js @@ -6,7 +6,7 @@ module.exports = { forwarder1TargetPlaceholder: "beefbeefbeefbeefbeefbeefbeefbeefbeefbeef", forwarder2TargetPlaceholder: "feebfeebfeebfeebfeebfeebfeebfeebfeebfeeb", minimeTokenFactoryPlaceholder: "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", - kitDistrictPlaceholder: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + ensPlaceholder: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", zeroAddress: "0x0000000000000000000000000000000000000000", dsGuardANY: "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", aragonENSNode: namehash.hash("aragonid.eth") diff --git a/resources/public/css/fonts/icomoon.eot b/resources/public/css/fonts/icomoon.eot index 9d0ab1d..5f3e97f 100755 Binary files a/resources/public/css/fonts/icomoon.eot and b/resources/public/css/fonts/icomoon.eot differ diff --git a/resources/public/css/fonts/icomoon.svg b/resources/public/css/fonts/icomoon.svg index cabd2cd..c82a753 100755 --- a/resources/public/css/fonts/icomoon.svg +++ b/resources/public/css/fonts/icomoon.svg @@ -7,7 +7,7 @@ - + @@ -18,7 +18,4 @@ - - - \ No newline at end of file diff --git a/resources/public/css/fonts/icomoon.ttf b/resources/public/css/fonts/icomoon.ttf index 6e10263..1290433 100755 Binary files a/resources/public/css/fonts/icomoon.ttf and b/resources/public/css/fonts/icomoon.ttf differ diff --git a/resources/public/css/fonts/icomoon.woff b/resources/public/css/fonts/icomoon.woff index 6d8ac19..ce026ea 100755 Binary files a/resources/public/css/fonts/icomoon.woff and b/resources/public/css/fonts/icomoon.woff differ diff --git a/resources/public/css/fonts/selection.json b/resources/public/css/fonts/selection.json index d5594dc..b91b913 100755 --- a/resources/public/css/fonts/selection.json +++ b/resources/public/css/fonts/selection.json @@ -1 +1 @@ -{"IcoMoonType":"selection","icons":[{"icon":{"paths":["M138.007 539.83c-0.289-4.387-0.458-9.544-0.465-14.732v-0.017c0-163.705 127.632-296.776 287.283-302.448 3.821 0 7.913 0 11.734 0.33l-38.070-37.837s153.27-25.6 350.071 92.723c0 0 2.89 6.002 0 23.641 0 0 92.723 39.748 100.636 117.013s-41.241 121.435-80.94 127.719c0 0 20.615-31.835-11.074-48.873-5.822-3.207-12.76-5.101-20.142-5.101-0.858 0-1.702 0.020-2.549 0.072l0.116-0.005c-60.606 0-67.588 68.752-67.588 68.752-0.649 3.442-0.649 6.933-0.649 10.375 0 0-8.844 87.457 136.010 97.745 31.090-39.749 59.864-84.481 84.366-131.779l2.257-4.783c35.992-68.88 65.667-148.809 84.934-232.706l1.322-6.819c-84.383-69.169-183.952-128.465-290.909-178.134-40.126-18.618-78.992-34.774-115.801-48.64-9.93-4.253-28.755-11.051-47.786-17.407l-8.999-2.607c-14.992 4.839-33.978 11.452-56.785 20.015-36.771 13.828-75.685 30.022-115.763 48.64-106.919 49.62-206.526 108.916-290.86 178.172 4.557 21.974 11.501 49.387 21.46 81.222 20.132 64.078 43.274 118.857 70.864 170.9l-2.626-5.431zM1024 274.716l-2.327 13.033c-1.212 10.105-9.444 46.313-19.598 80.989-20.942 70.936-45.776 131.895-75.801 189.72l2.774-5.866c-42.172 82.201-93.372 153.881-152.106 212.897-72.476 72.66-156.344 126.322-249.814 159.748l-5.217 1.862-9.91 3.821-15.311-5.353c-97.867-35.745-181.335-90.261-249.675-159.706l-0.080-0.081c-59.015-59.578-110.177-131.123-152.106-212.897-36.283-69.55-66.503-150.304-86.535-235.002l-1.436-7.169c-2.327-10.424-4.887-23.457-4.422-21.595l-2.425-13.401 5.585-4.655 4.092-3.491c85.828-72.243 187.345-134.186 296.96-186.279 51.335-25.549 114.25-51.492 179.023-73.373l11.212-3.281 14.797-4.606 10.105 3.025 5.023 1.629c50.269 16.156 117.062 41.891 190.090 76.616 109.479 51.996 210.851 113.852 296.592 185.949l10.521 7.447zM670.157 308.412c2.56-1.261 10.803-5.353 20.345-15.127 19.035 2.511 37.751 8.514 37.751 8.514-34.579-20.81-81.92-33.145-134.284-32.815 0 0 20.015 28.393 75.539 40.029l0.649-0.601z"],"attrs":[],"grid":0,"tags":["aragon"],"isMulticolor":false,"isMulticolor2":false,"colorPermutations":{}},"attrs":[],"properties":{"order":114,"id":12,"name":"aragon","prevSize":32,"code":59648,"codes":[59648,59649,59650,59651,59652,59653,59654]},"setIdx":0,"setId":8,"iconIdx":0},{"icon":{"paths":["M395.935 1020.252c5.485 2.354 11.868 3.723 18.571 3.723 13.319 0 25.375-5.405 34.095-14.141l0.001-0.001 0.054-0.037 366.295-368.128c8.612-8.699 13.933-20.671 13.933-33.886 0-26.605-21.567-48.172-48.172-48.172-13.304 0-25.348 5.393-34.066 14.112v0l-283.969 285.38v-810.931c-0.076-26.548-21.615-48.040-48.173-48.040s-48.097 21.492-48.173 48.033v810.949l-284.005-285.388c-8.735-8.823-20.849-14.286-34.239-14.286-26.605 0-48.172 21.567-48.172 48.172 0 13.301 5.391 25.343 14.106 34.060v0l366.385 368.165c4.336 4.336 9.491 7.852 15.215 10.295l0.315 0.12z"],"width":829,"isMulticolor":false,"isMulticolor2":false,"tags":["arrow-down"],"defaultCode":59648,"grid":0,"colorPermutations":{"12552552551":[]}},"properties":{"id":1,"order":115,"ligatures":"","prevSize":32,"code":59655,"name":"arrow-down"},"setIdx":0,"setId":8,"iconIdx":1},{"icon":{"paths":["M1260.317 534.901c2.908-6.775 4.599-14.66 4.599-22.941 0-16.453-6.676-31.346-17.468-42.118l-0.001-0.001-0.045-0.066-454.748-452.484c-10.723-10.508-25.422-16.992-41.636-16.992-32.865 0-59.507 26.642-59.507 59.507 0 16.326 6.574 31.116 17.22 41.867l-0.005-0.005 352.53 350.787h-1001.747c-32.795 0.094-59.344 26.7-59.344 59.508s26.549 59.415 59.335 59.508h1001.765l-352.539 350.831c-10.899 10.79-17.648 25.755-17.648 42.295 0 32.865 26.642 59.507 59.507 59.507 16.43 0 31.306-6.659 42.074-17.425v0l454.794-452.595c5.356-5.356 9.699-11.725 12.717-18.795l0.148-0.39z"],"width":1265,"isMulticolor":false,"isMulticolor2":false,"tags":["arrow-right"],"defaultCode":59649,"grid":0},"properties":{"id":2,"order":116,"ligatures":"","prevSize":32,"code":59656,"name":"arrow-right"},"setIdx":0,"setId":8,"iconIdx":2},{"icon":{"paths":["M326.114 346.118l172.494-173.342v532.983c0.079 27.819 22.649 50.339 50.479 50.339s50.399-22.521 50.479-50.332v-532.991l172.494 173.342c9.125 9.078 21.707 14.69 35.599 14.69 27.878 0 50.478-22.6 50.478-50.478 0-13.798-5.536-26.303-14.508-35.415l0.006 0.006-258.816-260.081c-9.133-9.169-21.769-14.842-35.73-14.842s-26.598 5.674-35.729 14.841l-0.002 0.002-0.057 0.039-258.759 260.042c-8.966 9.105-14.502 21.61-14.502 35.408 0 27.878 22.6 50.478 50.478 50.478 13.892 0 26.473-5.612 35.601-14.692l-0.002 0.002zM1047.657 503.581c-27.878 0.002-50.477 22.601-50.478 50.478v0 368.984h-896.221v-368.984c-0.079-27.819-22.649-50.339-50.479-50.339s-50.399 22.521-50.479 50.332v419.469c0.002 27.878 22.601 50.477 50.478 50.479h997.179c27.878-0.002 50.477-22.601 50.478-50.479v0-419.461c-0.002-27.878-22.601-50.477-50.478-50.478v0z"],"width":1098,"isMulticolor":false,"isMulticolor2":false,"tags":["upload"],"defaultCode":59651,"grid":0},"properties":{"id":4,"order":117,"ligatures":"","prevSize":32,"code":59657,"name":"upload"},"setIdx":0,"setId":8,"iconIdx":4},{"icon":{"paths":["M925.714 242.286c-25.143 36.571-56.571 69.143-92.571 95.429 0.571 8 0.571 16 0.571 24 0 244-185.714 525.143-525.143 525.143-104.571 0-201.714-30.286-283.429-82.857 14.857 1.714 29.143 2.286 44.571 2.286 86.286 0 165.714-29.143 229.143-78.857-81.143-1.714-149.143-54.857-172.571-128 11.429 1.714 22.857 2.857 34.857 2.857 16.571 0 33.143-2.286 48.571-6.286-84.571-17.143-148-91.429-148-181.143v-2.286c24.571 13.714 53.143 22.286 83.429 23.429-49.714-33.143-82.286-89.714-82.286-153.714 0-34.286 9.143-65.714 25.143-93.143 90.857 112 227.429 185.143 380.571 193.143-2.857-13.714-4.571-28-4.571-42.286 0-101.714 82.286-184.571 184.571-184.571 53.143 0 101.143 22.286 134.857 58.286 41.714-8 81.714-23.429 117.143-44.571-13.714 42.857-42.857 78.857-81.143 101.714 37.143-4 73.143-14.286 106.286-28.571z"],"width":951,"isMulticolor":false,"isMulticolor2":false,"tags":["twitter"],"defaultCode":61593,"grid":0},"properties":{"id":5,"order":118,"ligatures":"","prevSize":32,"code":61593,"name":"twitter"},"setIdx":0,"setId":8,"iconIdx":5},{"icon":{"paths":["M548 16v150.857h-89.714c-70.286 0-83.429 33.714-83.429 82.286v108h167.429l-22.286 169.143h-145.143v433.714h-174.857v-433.714h-145.714v-169.143h145.714v-124.571c0-144.571 88.571-223.429 217.714-223.429 61.714 0 114.857 4.571 130.286 6.857z"],"width":602,"isMulticolor":false,"isMulticolor2":false,"tags":["facebook","facebook-f"],"defaultCode":61594,"grid":0},"properties":{"id":6,"order":119,"ligatures":"","prevSize":32,"code":61594,"name":"facebook"},"setIdx":0,"setId":8,"iconIdx":6},{"icon":{"paths":["M438.857 82.286c242.286 0 438.857 196.571 438.857 438.857 0 193.714-125.714 358.286-300 416.571-22.286 4-30.286-9.714-30.286-21.143 0-14.286 0.571-61.714 0.571-120.571 0-41.143-13.714-67.429-29.714-81.143 97.714-10.857 200.571-48 200.571-216.571 0-48-17.143-86.857-45.143-117.714 4.571-11.429 19.429-56-4.571-116.571-36.571-11.429-120.571 45.143-120.571 45.143-34.857-9.714-72.571-14.857-109.714-14.857s-74.857 5.143-109.714 14.857c0 0-84-56.571-120.571-45.143-24 60.571-9.143 105.143-4.571 116.571-28 30.857-45.143 69.714-45.143 117.714 0 168 102.286 205.714 200 216.571-12.571 11.429-24 30.857-28 58.857-25.143 11.429-89.143 30.857-127.429-36.571-24-41.714-67.429-45.143-67.429-45.143-42.857-0.571-2.857 26.857-2.857 26.857 28.571 13.143 48.571 64 48.571 64 25.714 78.286 148 52 148 52 0 36.571 0.571 70.857 0.571 81.714 0 11.429-8 25.143-30.286 21.143-174.286-58.286-300-222.857-300-416.571 0-242.286 196.571-438.857 438.857-438.857zM166.286 712.572c1.143-2.286-0.571-5.143-4-6.857-3.429-1.143-6.286-0.571-7.429 1.143-1.143 2.286 0.571 5.143 4 6.857 2.857 1.714 6.286 1.143 7.429-1.143zM184 732c2.286-1.714 1.714-5.714-1.143-9.143-2.857-2.857-6.857-4-9.143-1.714-2.286 1.714-1.714 5.714 1.143 9.143 2.857 2.857 6.857 4 9.143 1.714zM201.143 757.714c2.857-2.286 2.857-6.857 0-10.857-2.286-4-6.857-5.714-9.714-3.429-2.857 1.714-2.857 6.286 0 10.286s7.429 5.714 9.714 4zM225.143 781.714c2.286-2.286 1.143-7.429-2.286-10.857-4-4-9.143-4.571-11.429-1.714-2.857 2.286-1.714 7.429 2.286 10.857 4 4 9.143 4.571 11.429 1.714zM257.714 796c1.143-3.429-2.286-7.429-7.429-9.143-4.571-1.143-9.714 0.571-10.857 4s2.286 7.429 7.429 8.571c4.571 1.714 9.714 0 10.857-3.429zM293.714 798.857c0-4-4.571-6.857-9.714-6.286-5.143 0-9.143 2.857-9.143 6.286 0 4 4 6.857 9.714 6.286 5.143 0 9.143-2.857 9.143-6.286zM326.857 793.143c-0.571-3.429-5.143-5.714-10.286-5.143-5.143 1.143-8.571 4.571-8 8.571 0.571 3.429 5.143 5.714 10.286 4.571s8.571-4.571 8-8z"],"width":878,"isMulticolor":false,"isMulticolor2":false,"tags":["github"],"defaultCode":61595,"grid":0},"properties":{"id":7,"order":120,"ligatures":"","prevSize":32,"code":61595,"name":"github"},"setIdx":0,"setId":8,"iconIdx":7},{"icon":{"paths":["M341.143 249.714v670.286c0 17.714-8.571 34.286-28 34.286-6.857 0-13.143-1.714-18.857-4.571l-265.714-133.143c-16-8-28.571-28.571-28.571-45.714v-651.429c0-14.286 6.857-27.429 22.286-27.429 9.143 0 17.143 4.571 25.143 8.571l292 146.286c0.571 0.571 1.714 2.286 1.714 2.857zM377.714 307.429l305.143 494.857-305.143-152v-342.857zM1024 317.714v602.286c0 18.857-10.857 32-29.714 32-9.714 0-18.857-2.857-26.857-7.429l-252-125.714zM1022.286 249.143c0 2.286-295.429 481.714-318.286 518.286l-222.857-362.286 185.143-301.143c6.286-10.286 17.714-16 29.714-16 5.143 0 10.286 1.143 14.857 3.429l309.143 154.286c1.143 0.571 2.286 1.714 2.286 3.429z"],"isMulticolor":false,"isMulticolor2":false,"tags":["medium"],"defaultCode":62010,"grid":0},"properties":{"id":10,"order":121,"ligatures":"","prevSize":32,"code":62010,"name":"medium"},"setIdx":0,"setId":8,"iconIdx":10},{"icon":{"paths":["M1024 492.572c0 44.571-25.143 82.857-62.286 101.714 4.571 17.714 6.857 36 6.857 54.857 0 180.571-204 326.857-455.429 326.857-250.857 0-454.857-146.286-454.857-326.857 0-18.286 2.286-36.571 6.286-53.714-38.286-18.857-64.571-57.714-64.571-102.857 0-62.857 50.857-113.714 113.714-113.714 32.571 0 61.714 13.714 82.857 36 77.143-53.714 180-88.571 294.286-92.571l66.286-297.714c2.286-10.286 13.143-17.143 23.429-14.857l210.857 46.286c13.714-27.429 42.857-46.857 76-46.857 47.429 0 85.714 38.286 85.714 85.143 0 47.429-38.286 85.714-85.714 85.714-46.857 0-85.143-38.286-85.143-85.143l-190.857-42.286-59.429 269.714c114.857 3.429 218.857 37.714 296.571 91.429 20.571-21.714 49.714-34.857 81.714-34.857 62.857 0 113.714 50.857 113.714 113.714zM238.857 606.286c0 47.429 38.286 85.714 85.143 85.714 47.429 0 85.714-38.286 85.714-85.714 0-46.857-38.286-85.143-85.714-85.143-46.857 0-85.143 38.286-85.143 85.143zM701.714 809.143c8.571-8.571 8.571-21.143 0-29.714-8-8-21.143-8-29.143 0-34.286 34.857-108 46.857-160.571 46.857s-126.286-12-160.571-46.857c-8-8-21.143-8-29.143 0-8.571 8-8.571 21.143 0 29.714 54.286 54.286 158.857 58.286 189.714 58.286s135.429-4 189.714-58.286zM700 692c46.857 0 85.143-38.286 85.143-85.714 0-46.857-38.286-85.143-85.143-85.143-47.429 0-85.714 38.286-85.714 85.143 0 47.429 38.286 85.714 85.714 85.714z"],"isMulticolor":false,"isMulticolor2":false,"tags":["reddit-alien"],"defaultCode":62081,"grid":0},"properties":{"id":11,"order":122,"ligatures":"","prevSize":32,"code":62081,"name":"reddit-alien"},"setIdx":0,"setId":8,"iconIdx":11},{"icon":{"paths":["M862.805 0c59.989 0 108.373 48.512 111.232 105.6v918.4l-114.219-96.981-62.72-57.088-68.437-59.648 28.587 94.080h-598.955c-59.819 0-108.373-45.44-108.373-105.643v-692.907c0-57.088 48.64-105.685 108.587-105.685l704.299-0.128zM601.771 242.475h-1.28l-8.619 8.533c88.448 25.6 131.243 65.579 131.243 65.579-57.003-28.501-108.373-42.752-159.744-48.512-37.12-5.76-74.24-2.731-105.6 0h-8.533c-20.053 0-62.72 8.533-119.893 31.36-19.925 8.661-31.36 14.336-31.36 14.336s42.752-42.752 136.96-65.579l-5.76-5.76s-71.339-2.731-148.352 54.187c0 0-77.013 134.144-77.013 299.52 0 0 42.667 74.24 159.701 77.056 0 0 17.067-22.741 34.347-42.752-65.707-19.968-91.307-59.904-91.307-59.904s5.717 2.816 14.293 8.533h2.56c1.28 0 1.877 0.64 2.56 1.28v0.256c0.683 0.683 1.28 1.28 2.56 1.28 14.080 5.803 28.16 11.52 39.68 17.067 19.883 8.619 45.44 17.195 76.8 22.869 39.68 5.76 85.163 8.533 136.96 0 25.6-5.76 51.2-11.392 76.8-22.827 16.64-8.533 37.12-17.067 59.605-31.445 0 0-25.6 39.936-94.080 59.904 14.080 19.883 33.92 42.667 33.92 42.667 117.077-2.56 162.56-76.8 165.12-73.643 0-165.12-77.44-299.52-77.44-299.52-69.76-51.797-135.040-53.76-146.56-53.76l2.389-0.853zM608.939 430.763c29.995 0 54.187 25.6 54.187 56.96 0 31.573-24.32 57.173-54.187 57.173s-54.187-25.6-54.187-56.917c0.085-31.573 24.448-57.088 54.187-57.088zM415.104 430.763c29.867 0 54.016 25.6 54.016 56.96 0 31.573-24.32 57.173-54.187 57.173s-54.187-25.6-54.187-56.917c0-31.573 24.32-57.088 54.187-57.088z"],"attrs":[],"isMulticolor":false,"isMulticolor2":false,"tags":["discord"],"grid":0,"colorPermutations":{}},"attrs":[],"properties":{"order":123,"id":0,"prevSize":32,"name":"discord","code":59658},"setIdx":1,"setId":7,"iconIdx":0},{"icon":{"paths":["M512 0c-282.8 0-512 229.2-512 512s229.2 512 512 512 512-229.2 512-512-229.2-512-512-512zM763.6 351l-84 395.8c-5.8 28.2-22.8 34.8-46.4 21.8l-128-94.6-61.4 59.8c-7.2 7-12.8 12.8-25.6 12.8-16.6 0-13.8-6.2-19.4-22l-43.6-143.2-126.6-39.4c-27.4-8.4-27.6-27.2 6.2-40.6l493.2-190.4c22.4-10.2 44.2 5.4 35.6 40z"],"tags":["telegram","brand","social"],"defaultCode":60053,"grid":16,"attrs":[]},"attrs":[],"properties":{"name":"telegram","ligatures":"telegram, brand15","order":124,"id":406,"prevSize":32,"code":60053},"setIdx":7,"setId":1,"iconIdx":405}],"height":1024,"metadata":{"name":"icomoon"},"preferences":{"showGlyphs":true,"showQuickUse":true,"showQuickUse2":true,"showSVGs":true,"fontPref":{"prefix":"icon-","metadata":{"fontFamily":"icomoon","majorVersion":1,"minorVersion":0},"metrics":{"emSize":1024,"baseline":6.25,"whitespace":50},"embed":false,"showSelector":true,"showMetrics":true,"showMetadata":true,"ie7":true,"noie8":false,"cssVars":false,"cssVarsFormat":"less","showVersion":true,"selector":"","classSelector":".icon"},"imagePref":{"prefix":"icon-","png":false,"useClassSelector":true,"color":0,"bgColor":16777215,"classSelector":".icon","height":32,"columns":16,"margin":16,"name":"icomoon"},"historySize":50,"showCodes":false,"gridSize":16,"showLiga":true,"showGrid":true}} \ No newline at end of file +{"IcoMoonType":"selection","icons":[{"icon":{"paths":["M840.224 460.386c-3.213-8.426-11.227-14.303-20.613-14.304l-265.32-0 153.042-297.554c1.536-2.92 2.437-6.381 2.437-10.052 0-6.984-3.263-13.207-8.347-17.226l-0.046-0.035c-3.693-2.943-8.427-4.723-13.577-4.723-0.009 0-0.018 0-0.027 0l0.001-0c-5.497 0.004-10.522 2.025-14.374 5.363l0.028-0.023-483.4 417.482c-4.675 4.050-7.615 9.995-7.615 16.626 0 2.748 0.505 5.377 1.426 7.802l-0.050-0.151c3.201 8.43 11.207 14.314 20.588 14.327l0.002 0h265.32l-153.042 297.554c-1.536 2.92-2.437 6.381-2.437 10.052 0 6.984 3.263 13.207 8.347 17.226l0.046 0.035c3.693 2.943 8.427 4.723 13.577 4.723 0.009 0 0.018-0 0.027-0l-0.001 0c5.497-0.004 10.522-2.025 14.374-5.363l-0.028 0.023 483.4-417.482c4.686-4.056 7.633-10.013 7.633-16.658 0-2.744-0.503-5.371-1.421-7.794l0.050 0.151z"],"isMulticolor":false,"isMulticolor2":false,"tags":["snapshot"],"defaultCode":59098,"grid":0},"properties":{"id":14,"order":19,"ligatures":"","prevSize":32,"code":59098,"name":"snapshot"},"setIdx":0,"setId":6,"iconIdx":13},{"icon":{"paths":["M395.935 1020.252c5.485 2.354 11.868 3.723 18.571 3.723 13.319 0 25.375-5.405 34.095-14.141l0.001-0.001 0.054-0.037 366.295-368.128c8.612-8.699 13.933-20.671 13.933-33.886 0-26.605-21.567-48.172-48.172-48.172-13.304 0-25.348 5.393-34.066 14.112v0l-283.969 285.38v-810.931c-0.076-26.548-21.615-48.040-48.173-48.040s-48.097 21.492-48.173 48.033v810.949l-284.005-285.388c-8.735-8.823-20.849-14.286-34.239-14.286-26.605 0-48.172 21.567-48.172 48.172 0 13.301 5.391 25.343 14.106 34.060v0l366.385 368.165c4.336 4.336 9.491 7.852 15.215 10.295l0.315 0.12z"],"width":829,"isMulticolor":false,"isMulticolor2":false,"tags":["arrow-down"],"defaultCode":59655,"grid":0},"properties":{"id":2,"order":20,"ligatures":"","prevSize":32,"code":59655,"name":"arrow-down"},"setIdx":2,"setId":4,"iconIdx":1},{"icon":{"paths":["M1260.317 534.901c2.908-6.775 4.599-14.66 4.599-22.941 0-16.453-6.676-31.346-17.468-42.118l-0.001-0.001-0.045-0.066-454.748-452.484c-10.723-10.508-25.422-16.992-41.636-16.992-32.865 0-59.507 26.642-59.507 59.507 0 16.326 6.574 31.116 17.22 41.867l-0.005-0.005 352.53 350.787h-1001.747c-32.795 0.094-59.344 26.7-59.344 59.508s26.549 59.415 59.335 59.508h1001.765l-352.539 350.831c-10.899 10.79-17.648 25.755-17.648 42.295 0 32.865 26.642 59.507 59.507 59.507 16.43 0 31.306-6.659 42.074-17.425v0l454.794-452.595c5.356-5.356 9.699-11.725 12.717-18.795l0.148-0.39z"],"width":1265,"isMulticolor":false,"isMulticolor2":false,"tags":["arrow-right"],"defaultCode":59656,"grid":0},"properties":{"id":3,"order":5,"ligatures":"","prevSize":32,"code":59656,"name":"arrow-right"},"setIdx":2,"setId":4,"iconIdx":2},{"icon":{"paths":["M326.114 346.118l172.494-173.342v532.983c0.079 27.819 22.649 50.339 50.479 50.339s50.399-22.521 50.479-50.332v-532.991l172.494 173.342c9.125 9.078 21.707 14.69 35.599 14.69 27.878 0 50.478-22.6 50.478-50.478 0-13.798-5.536-26.303-14.508-35.415l0.006 0.006-258.816-260.081c-9.133-9.169-21.769-14.842-35.73-14.842s-26.598 5.674-35.729 14.841l-0.002 0.002-0.057 0.039-258.759 260.042c-8.966 9.105-14.502 21.61-14.502 35.408 0 27.878 22.6 50.478 50.478 50.478 13.892 0 26.473-5.612 35.601-14.692l-0.002 0.002zM1047.657 503.581c-27.878 0.002-50.477 22.601-50.478 50.478v0 368.984h-896.221v-368.984c-0.079-27.819-22.649-50.339-50.479-50.339s-50.399 22.521-50.479 50.332v419.469c0.002 27.878 22.601 50.477 50.478 50.479h997.179c27.878-0.002 50.477-22.601 50.478-50.479v0-419.461c-0.002-27.878-22.601-50.477-50.478-50.478v0z"],"width":1098,"isMulticolor":false,"isMulticolor2":false,"tags":["upload"],"defaultCode":59657,"grid":0},"properties":{"id":4,"order":6,"ligatures":"","prevSize":32,"code":59657,"name":"upload"},"setIdx":2,"setId":4,"iconIdx":3},{"icon":{"paths":["M862.805 0c59.989 0 108.373 48.512 111.232 105.6v918.4l-114.219-96.981-62.72-57.088-68.437-59.648 28.587 94.080h-598.955c-59.819 0-108.373-45.44-108.373-105.643v-692.907c0-57.088 48.64-105.685 108.587-105.685l704.299-0.128zM601.771 242.475h-1.28l-8.619 8.533c88.448 25.6 131.243 65.579 131.243 65.579-57.003-28.501-108.373-42.752-159.744-48.512-37.12-5.76-74.24-2.731-105.6 0h-8.533c-20.053 0-62.72 8.533-119.893 31.36-19.925 8.661-31.36 14.336-31.36 14.336s42.752-42.752 136.96-65.579l-5.76-5.76s-71.339-2.731-148.352 54.187c0 0-77.013 134.144-77.013 299.52 0 0 42.667 74.24 159.701 77.056 0 0 17.067-22.741 34.347-42.752-65.707-19.968-91.307-59.904-91.307-59.904s5.717 2.816 14.293 8.533h2.56c1.28 0 1.877 0.64 2.56 1.28v0.256c0.683 0.683 1.28 1.28 2.56 1.28 14.080 5.803 28.16 11.52 39.68 17.067 19.883 8.619 45.44 17.195 76.8 22.869 39.68 5.76 85.163 8.533 136.96 0 25.6-5.76 51.2-11.392 76.8-22.827 16.64-8.533 37.12-17.067 59.605-31.445 0 0-25.6 39.936-94.080 59.904 14.080 19.883 33.92 42.667 33.92 42.667 117.077-2.56 162.56-76.8 165.12-73.643 0-165.12-77.44-299.52-77.44-299.52-69.76-51.797-135.040-53.76-146.56-53.76l2.389-0.853zM608.939 430.763c29.995 0 54.187 25.6 54.187 56.96 0 31.573-24.32 57.173-54.187 57.173s-54.187-25.6-54.187-56.917c0.085-31.573 24.448-57.088 54.187-57.088zM415.104 430.763c29.867 0 54.016 25.6 54.016 56.96 0 31.573-24.32 57.173-54.187 57.173s-54.187-25.6-54.187-56.917c0-31.573 24.32-57.088 54.187-57.088z"],"isMulticolor":false,"isMulticolor2":false,"tags":["discord"],"defaultCode":59658,"grid":0},"properties":{"id":5,"order":7,"ligatures":"","prevSize":32,"code":59658,"name":"discord"},"setIdx":2,"setId":4,"iconIdx":4},{"icon":{"paths":["M512 0c-282.8 0-512 229.2-512 512s229.2 512 512 512 512-229.2 512-512-229.2-512-512-512zM763.6 351l-84 395.8c-5.8 28.2-22.8 34.8-46.4 21.8l-128-94.6-61.4 59.8c-7.2 7-12.8 12.8-25.6 12.8-16.6 0-13.8-6.2-19.4-22l-43.6-143.2-126.6-39.4c-27.4-8.4-27.6-27.2 6.2-40.6l493.2-190.4c22.4-10.2 44.2 5.4 35.6 40z"],"isMulticolor":false,"isMulticolor2":false,"tags":["telegram"],"defaultCode":60053,"grid":0},"properties":{"id":6,"order":8,"ligatures":"telegram, brand15","prevSize":32,"code":60053,"name":"telegram"},"setIdx":2,"setId":4,"iconIdx":5},{"icon":{"paths":["M925.714 242.286c-25.143 36.571-56.571 69.143-92.571 95.429 0.571 8 0.571 16 0.571 24 0 244-185.714 525.143-525.143 525.143-104.571 0-201.714-30.286-283.429-82.857 14.857 1.714 29.143 2.286 44.571 2.286 86.286 0 165.714-29.143 229.143-78.857-81.143-1.714-149.143-54.857-172.571-128 11.429 1.714 22.857 2.857 34.857 2.857 16.571 0 33.143-2.286 48.571-6.286-84.571-17.143-148-91.429-148-181.143v-2.286c24.571 13.714 53.143 22.286 83.429 23.429-49.714-33.143-82.286-89.714-82.286-153.714 0-34.286 9.143-65.714 25.143-93.143 90.857 112 227.429 185.143 380.571 193.143-2.857-13.714-4.571-28-4.571-42.286 0-101.714 82.286-184.571 184.571-184.571 53.143 0 101.143 22.286 134.857 58.286 41.714-8 81.714-23.429 117.143-44.571-13.714 42.857-42.857 78.857-81.143 101.714 37.143-4 73.143-14.286 106.286-28.571z"],"width":951,"isMulticolor":false,"isMulticolor2":false,"tags":["twitter"],"defaultCode":61593,"grid":0},"properties":{"id":7,"order":9,"ligatures":"","prevSize":32,"code":61593,"name":"twitter"},"setIdx":2,"setId":4,"iconIdx":6},{"icon":{"paths":["M548 16v150.857h-89.714c-70.286 0-83.429 33.714-83.429 82.286v108h167.429l-22.286 169.143h-145.143v433.714h-174.857v-433.714h-145.714v-169.143h145.714v-124.571c0-144.571 88.571-223.429 217.714-223.429 61.714 0 114.857 4.571 130.286 6.857z"],"width":602,"isMulticolor":false,"isMulticolor2":false,"tags":["facebook"],"defaultCode":61594,"grid":0},"properties":{"id":8,"order":10,"ligatures":"","prevSize":32,"code":61594,"name":"facebook"},"setIdx":2,"setId":4,"iconIdx":7},{"icon":{"paths":["M438.857 82.286c242.286 0 438.857 196.571 438.857 438.857 0 193.714-125.714 358.286-300 416.571-22.286 4-30.286-9.714-30.286-21.143 0-14.286 0.571-61.714 0.571-120.571 0-41.143-13.714-67.429-29.714-81.143 97.714-10.857 200.571-48 200.571-216.571 0-48-17.143-86.857-45.143-117.714 4.571-11.429 19.429-56-4.571-116.571-36.571-11.429-120.571 45.143-120.571 45.143-34.857-9.714-72.571-14.857-109.714-14.857s-74.857 5.143-109.714 14.857c0 0-84-56.571-120.571-45.143-24 60.571-9.143 105.143-4.571 116.571-28 30.857-45.143 69.714-45.143 117.714 0 168 102.286 205.714 200 216.571-12.571 11.429-24 30.857-28 58.857-25.143 11.429-89.143 30.857-127.429-36.571-24-41.714-67.429-45.143-67.429-45.143-42.857-0.571-2.857 26.857-2.857 26.857 28.571 13.143 48.571 64 48.571 64 25.714 78.286 148 52 148 52 0 36.571 0.571 70.857 0.571 81.714 0 11.429-8 25.143-30.286 21.143-174.286-58.286-300-222.857-300-416.571 0-242.286 196.571-438.857 438.857-438.857zM166.286 712.572c1.143-2.286-0.571-5.143-4-6.857-3.429-1.143-6.286-0.571-7.429 1.143-1.143 2.286 0.571 5.143 4 6.857 2.857 1.714 6.286 1.143 7.429-1.143zM184 732c2.286-1.714 1.714-5.714-1.143-9.143-2.857-2.857-6.857-4-9.143-1.714-2.286 1.714-1.714 5.714 1.143 9.143 2.857 2.857 6.857 4 9.143 1.714zM201.143 757.714c2.857-2.286 2.857-6.857 0-10.857-2.286-4-6.857-5.714-9.714-3.429-2.857 1.714-2.857 6.286 0 10.286s7.429 5.714 9.714 4zM225.143 781.714c2.286-2.286 1.143-7.429-2.286-10.857-4-4-9.143-4.571-11.429-1.714-2.857 2.286-1.714 7.429 2.286 10.857 4 4 9.143 4.571 11.429 1.714zM257.714 796c1.143-3.429-2.286-7.429-7.429-9.143-4.571-1.143-9.714 0.571-10.857 4s2.286 7.429 7.429 8.571c4.571 1.714 9.714 0 10.857-3.429zM293.714 798.857c0-4-4.571-6.857-9.714-6.286-5.143 0-9.143 2.857-9.143 6.286 0 4 4 6.857 9.714 6.286 5.143 0 9.143-2.857 9.143-6.286zM326.857 793.143c-0.571-3.429-5.143-5.714-10.286-5.143-5.143 1.143-8.571 4.571-8 8.571 0.571 3.429 5.143 5.714 10.286 4.571s8.571-4.571 8-8z"],"width":878,"isMulticolor":false,"isMulticolor2":false,"tags":["github"],"defaultCode":61595,"grid":0},"properties":{"id":9,"order":11,"ligatures":"","prevSize":32,"code":61595,"name":"github"},"setIdx":2,"setId":4,"iconIdx":8},{"icon":{"paths":["M341.143 249.714v670.286c0 17.714-8.571 34.286-28 34.286-6.857 0-13.143-1.714-18.857-4.571l-265.714-133.143c-16-8-28.571-28.571-28.571-45.714v-651.429c0-14.286 6.857-27.429 22.286-27.429 9.143 0 17.143 4.571 25.143 8.571l292 146.286c0.571 0.571 1.714 2.286 1.714 2.857zM377.714 307.429l305.143 494.857-305.143-152v-342.857zM1024 317.714v602.286c0 18.857-10.857 32-29.714 32-9.714 0-18.857-2.857-26.857-7.429l-252-125.714zM1022.286 249.143c0 2.286-295.429 481.714-318.286 518.286l-222.857-362.286 185.143-301.143c6.286-10.286 17.714-16 29.714-16 5.143 0 10.286 1.143 14.857 3.429l309.143 154.286c1.143 0.571 2.286 1.714 2.286 3.429z"],"isMulticolor":false,"isMulticolor2":false,"tags":["medium"],"defaultCode":62010,"grid":0},"properties":{"id":10,"order":12,"ligatures":"","prevSize":32,"code":62010,"name":"medium"},"setIdx":2,"setId":4,"iconIdx":9},{"icon":{"paths":["M1024 492.572c0 44.571-25.143 82.857-62.286 101.714 4.571 17.714 6.857 36 6.857 54.857 0 180.571-204 326.857-455.429 326.857-250.857 0-454.857-146.286-454.857-326.857 0-18.286 2.286-36.571 6.286-53.714-38.286-18.857-64.571-57.714-64.571-102.857 0-62.857 50.857-113.714 113.714-113.714 32.571 0 61.714 13.714 82.857 36 77.143-53.714 180-88.571 294.286-92.571l66.286-297.714c2.286-10.286 13.143-17.143 23.429-14.857l210.857 46.286c13.714-27.429 42.857-46.857 76-46.857 47.429 0 85.714 38.286 85.714 85.143 0 47.429-38.286 85.714-85.714 85.714-46.857 0-85.143-38.286-85.143-85.143l-190.857-42.286-59.429 269.714c114.857 3.429 218.857 37.714 296.571 91.429 20.571-21.714 49.714-34.857 81.714-34.857 62.857 0 113.714 50.857 113.714 113.714zM238.857 606.286c0 47.429 38.286 85.714 85.143 85.714 47.429 0 85.714-38.286 85.714-85.714 0-46.857-38.286-85.143-85.714-85.143-46.857 0-85.143 38.286-85.143 85.143zM701.714 809.143c8.571-8.571 8.571-21.143 0-29.714-8-8-21.143-8-29.143 0-34.286 34.857-108 46.857-160.571 46.857s-126.286-12-160.571-46.857c-8-8-21.143-8-29.143 0-8.571 8-8.571 21.143 0 29.714 54.286 54.286 158.857 58.286 189.714 58.286s135.429-4 189.714-58.286zM700 692c46.857 0 85.143-38.286 85.143-85.714 0-46.857-38.286-85.143-85.143-85.143-47.429 0-85.714 38.286-85.714 85.143 0 47.429 38.286 85.714 85.714 85.714z"],"isMulticolor":false,"isMulticolor2":false,"tags":["reddit-alien"],"defaultCode":62081,"grid":0},"properties":{"id":11,"order":13,"ligatures":"","prevSize":32,"code":62081,"name":"reddit-alien"},"setIdx":2,"setId":4,"iconIdx":10}],"height":1024,"metadata":{"name":"icomoon"},"preferences":{"showGlyphs":true,"showQuickUse":true,"showQuickUse2":true,"showSVGs":true,"fontPref":{"prefix":"icon-","metadata":{"fontFamily":"icomoon"},"metrics":{"emSize":1024,"baseline":6.25,"whitespace":50},"embed":false,"resetPoint":59648},"imagePref":{"prefix":"icon-","png":true,"useClassSelector":true,"color":0,"bgColor":16777215,"classSelector":".icon","name":"icomoon"},"historySize":50,"showCodes":true,"gridSize":16}} \ No newline at end of file diff --git a/resources/public/css/icons.css b/resources/public/css/icons.css index 0e6f5a2..775fbd5 100755 --- a/resources/public/css/icons.css +++ b/resources/public/css/icons.css @@ -34,8 +34,8 @@ -moz-osx-font-smoothing: grayscale; } -.icon-aragon:before { - content: "\e900"; +.icon-snapshot:before { + content: "\e6da"; } .icon-arrow-down:before { content: "\e907"; diff --git a/resources/schema.graphql b/resources/schema.graphql index 21e8818..e36335c 100644 --- a/resources/schema.graphql +++ b/resources/schema.graphql @@ -125,8 +125,7 @@ type District implements RegEntry { district_stakeBank: String district_facebookUrl: String district_twitterUrl: String - district_aragonDao: String - district_aragonId: String + district_ensName: String district_dntStaked: Float district_totalSupply: Float diff --git a/src/district_registry/server/contract/district_factory.cljs b/src/district_registry/server/contract/district_factory.cljs index a9dfab6..24a1b2b 100644 --- a/src/district_registry/server/contract/district_factory.cljs +++ b/src/district_registry/server/contract/district_factory.cljs @@ -1,12 +1,15 @@ (ns district-registry.server.contract.district-factory (:require [cljs-web3-next.eth :as web3-eth] [cljs-web3-next.utils :as web3-utils] + [cljs.nodejs :as nodejs] [district-registry.server.contract.dnt :as dnt] [district.server.smart-contracts :as smart-contracts] [district.server.web3 :refer [web3]])) -(defn create-district-data [{:keys [:creator :meta-hash :aragon-id]}] - (web3-eth/encode-abi (smart-contracts/instance :district-factory) :create-district [creator (web3-utils/to-hex @web3 meta-hash) aragon-id])) +(defonce namehash (nodejs/require "eth-ens-namehash")) + +(defn create-district-data [{:keys [:creator :meta-hash :ens-name]}] + (web3-eth/encode-abi (smart-contracts/instance :district-factory) :create-district [creator (web3-utils/to-hex @web3 meta-hash) (namehash.hash ens-name) ens-name])) (defn approve-and-create-district [{:keys [:amount] :as args} & [opts]] (dnt/approve-and-call {:spender (smart-contracts/contract-address :district-factory) diff --git a/src/district_registry/server/db.cljs b/src/district_registry/server/db.cljs index 6942d9d..a6e1ebe 100644 --- a/src/district_registry/server/db.cljs +++ b/src/district_registry/server/db.cljs @@ -44,8 +44,7 @@ [:district/background-image-hash :string] [:district/dnt-staked :unsigned :BIG :INT not-nil] [:district/total-supply :unsigned :BIG :INT not-nil] - [:district/aragon-dao address not-nil] - [:district/aragon-id :string not-nil] + [:district/ens-name :string not-nil] [:district/stake-bank :string not-nil] [(sql/call :primary-key :reg-entry/address)] [(sql/call :foreign-key :reg-entry/address) (sql/call :references :reg-entries :reg-entry/address)]]) diff --git a/src/district_registry/server/syncer.cljs b/src/district_registry/server/syncer.cljs index d66cedd..81eba6c 100644 --- a/src/district_registry/server/syncer.cljs +++ b/src/district_registry/server/syncer.cljs @@ -38,7 +38,7 @@ (defn district-constructed-event [_ {:keys [:args]}] (try-catch - (let [{:keys [:registry-entry :timestamp :creator :meta-hash :version :deposit :challenge-period-end :stake-bank :aragon-dao :aragon-id] :as arguments} args] + (let [{:keys [:registry-entry :timestamp :creator :meta-hash :version :deposit :challenge-period-end :stake-bank :ens-name] :as arguments} args] (log/info "district-constructed-event" arguments) (let [registry-entry-data {:reg-entry/address registry-entry :reg-entry/creator creator @@ -51,8 +51,7 @@ :district/dnt-staked 0 :district/total-supply 0 :district/stake-bank stake-bank - :district/aragon-dao aragon-dao - :district/aragon-id aragon-id}] + :district/ens-name ens-name}] (insert-registry-entry! registry-entry-data timestamp) (db/insert-district! district) (let [{:keys [:district/meta-hash]} district] diff --git a/src/district_registry/ui/components/district_form.cljs b/src/district_registry/ui/components/district_form.cljs index 691e0b5..fa3e420 100644 --- a/src/district_registry/ui/components/district_form.cljs +++ b/src/district_registry/ui/components/district_form.cljs @@ -65,7 +65,7 @@ :github-url "https://github.com/district0x/name-bazaar" :facebook-url "https://www.facebook.com/district0x/" :twitter-url "https://twitter.com/NameBazaar0x" - :aragon-id "namebazaar" + :ens-name "namebazaar.eth" :description "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a augue quis metus sollicudin mattis. Duis efficitur tellus felis, et tincidunt turpis aliquet non. Aenean augue metus, masuada non rutrum ut, ornare ac orci. Lorem ipsum dolor sit amet, consectetur adipiscing. Lorem augue quis metus sollicitudin mattis. Duis efficitur tellus felis, et tincidunt turpis aliquet non."})) @@ -109,13 +109,11 @@ :type "submit"} "Save"]])) -(defn- aragon-full-name [aragon-id] - (str aragon-id ".aragonid.eth")) -(def debounced-check-availability +(def debounced-check-ownership (debounce (fn [value] - (dispatch [::ens/check-availability {:aragon-id value}])) + (dispatch [::ens/check-ownership {:ens-name value}])) 500)) @@ -146,9 +144,10 @@ form-data (r/atom (or form-data default-form-data))] (when (and (= "dev" (get-environment)) ;; dirty, but only for dev, so please forgive me (not edit?)) - (js/setTimeout #(dispatch [::ens/check-availability (select-keys @form-data [:aragon-id])]) 1000)) + (js/setTimeout #(dispatch [::ens/check-ownership (select-keys @form-data [:ens-name])]) 1000)) (fn [{:keys [:reg-entry/address]}] - (let [aragon-id-available? @(subscribe [::subs/aragon-id-available? (:aragon-id @form-data)]) + (let [owner-of-ens-name? @(subscribe [::subs/owner-of-ens-name? (:ens-name @form-data)]) + ens-has-snapshot? (and owner-of-ens-name? @(subscribe [::subs/has-snapshot? (:ens-name @form-data)])) deposit (when-not edit? (-> @deposit-query :search-param-changes @@ -161,7 +160,7 @@ :github-url :facebook-url :twitter-url - :aragon-id + :ens-name :logo-file-info :background-file-info]} @form-data errors (cond-> [] @@ -169,8 +168,9 @@ (empty? description) (conj "District description is required") (empty? url) (conj "URL is required") (empty? github-url) (conj "GitHub URL is required") - (and (not edit?) (empty? aragon-id)) (conj "Aragon ID is required") - (and (not edit?) (not (empty? aragon-id)) (false? aragon-id-available?)) (conj "Aragon ID is not available") + (and (not edit?) (empty? ens-name)) (conj "ENS Name is required") + (and (not edit?) (not (empty? ens-name)) (false? owner-of-ens-name?)) (conj "ENS Name does not belong to you") + (and (not edit?) (not (empty? ens-name)) (true? owner-of-ens-name?) (true? ens-has-snapshot?)) (conj "ENS Name is already lined to snapshot") (and (seq url) (not (spec/check ::spec/url url))) (conj "URL is not valid") (and (seq github-url) (not (re-find #"https?://github.com/.+" github-url))) (conj "GitHub URL is not valid") (and (seq facebook-url) (not (re-find #"https?://(www\.)?facebook.com/.+" facebook-url))) (conj "Facebook URL is not valid") @@ -216,25 +216,31 @@ :placeholder "Twitter URL" :id :twitter-url}] (when-not edit? - (let [aragon-id (:aragon-id @form-data) - hint (when-not (str/blank? aragon-id) - (condp = aragon-id-available? - true (str (aragon-full-name aragon-id) " is available") - false (str (aragon-full-name aragon-id) " is taken") - "Checking availability..."))] + (let [ens-name (:ens-name @form-data) + hint (when-not (str/blank? ens-name) + (condp = owner-of-ens-name? + true (condp = ens-has-snapshot? + true (str ens-name " is already linked to snapshot") + false (str ens-name " belongs to you") + "Checking ownership...") + false (str ens-name " does not belong to you") + "Checking ownership..."))] [text-input {:form-data form-data - :placeholder "Aragon ID" - :id :aragon-id - :class "aragon-id" - :group-class (condp = aragon-id-available? - true "available" + :placeholder "ENS Name" + :id :ens-name + :class "ens-name" + :group-class (condp = owner-of-ens-name? + true (condp = ens-has-snapshot? + true "taken" + false "available" + "checking") false "taken" "checking") - :errors {:local {:aragon-id {:hint hint}}} + :errors {:local {:ens-name {:hint hint}}} :on-change (fn [value] - (if (re-matches #"[a-z0-9]{0,100}" value) - (debounced-check-availability value) - (swap! form-data assoc-by-path :aragon-id aragon-id)))}])) + (if (re-matches #"[a-z0-9\.]{0,100}" value) + (debounced-check-ownership value) + (swap! form-data assoc-by-path :ens-name ens-name)))}])) [:div.submit-errors (doall (for [e errors] diff --git a/src/district_registry/ui/config.cljs b/src/district_registry/ui/config.cljs index 047e509..5191a69 100644 --- a/src/district_registry/ui/config.cljs +++ b/src/district_registry/ui/config.cljs @@ -31,7 +31,7 @@ :gateway "http://127.0.0.1:8080/ipfs"} :router {:html5? false} :router-google-analytics {:enabled? false} - :aragon-url "https://rinkeby.aragon.org/#/" + :snapshot-url "https://snapshot.org/#/" :district0x-emails-public-key "2564e15aaf9593acfdc633bd08f1fc5c089aa43972dd7e8a36d67825cd0154602da47d02f30e1f74e7e72c81ba5f0b3dd20d4d4f0cc6652a2e719a0e9d4c7f10943"}) (def qa-config @@ -56,7 +56,7 @@ :gateway "https://ipfs.qa.district0x.io/gateway/ipfs"} :router {:html5? true} :router-google-analytics {:enabled? false} - :aragon-url "https://rinkeby.aragon.org/#/" + :snapshot-url "https://snapshot.org/#/" :district0x-emails-public-key "2564e15aaf9593acfdc633bd08f1fc5c089aa43972dd7e8a36d67825cd0154602da47d02f30e1f74e7e72c81ba5f0b3dd20d4d4f0cc6652a2e719a0e9d4c7f10943"}) (def qa-dev-config (merge (assoc-in qa-config [:router :html5?] false) @@ -89,7 +89,7 @@ :gateway "https://ipfs.district0x.io/gateway/ipfs"} :router {:html5? true} :router-google-analytics {:enabled? true} - :aragon-url "https://mainnet.aragon.org/#/" + :snapshot-url "https://snapshot.org/#/" :district0x-emails-public-key "2564e15aaf9593acfdc633bd08f1fc5c089aa43972dd7e8a36d67825cd0154602da47d02f30e1f74e7e72c81ba5f0b3dd20d4d4f0cc6652a2e719a0e9d4c7f10943"}) (def config-map diff --git a/src/district_registry/ui/contract/district.cljs b/src/district_registry/ui/contract/district.cljs index c0f83e1..95f0e09 100644 --- a/src/district_registry/ui/contract/district.cljs +++ b/src/district_registry/ui/contract/district.cljs @@ -4,6 +4,8 @@ [cljs-web3.core :as web3] [cljs-web3.eth :as web3-eth] [cljs.spec.alpha :as s] + [clojure.string :as string] + [district-registry.ui.contract.ens :as ens] [district.format :as format] [district.parsers :as parsers] [district.ui.logging.events :as logging] @@ -19,6 +21,8 @@ (def interceptors [re-frame/trim-v]) +(def abi-resolver (js/JSON.parse "[{\"constant\":true,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"key\",\"type\":\"string\"}],\"name\":\"text\",\"outputs\":[{\"name\":\"ret\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"node\",\"type\":\"bytes32\"},{\"name\":\"key\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"string\"}],\"name\":\"setText\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]")) + (re-frame/reg-event-fx ::approve-and-stake-for interceptors @@ -90,4 +94,107 @@ ::estimate-return-for-stake-success interceptors (fn [{:keys [db]} [{:keys [:amount :stake-bank]} estimated-return]] - {:db (assoc-in db [::estimated-return-for-stake stake-bank amount] (web3-utils/wei->eth-number estimated-return))})) \ No newline at end of file + {:db (assoc-in db [::estimated-return-for-stake stake-bank amount] (web3-utils/wei->eth-number estimated-return))})) + + +(defn build-snapshot-file + [name network state-bank] + (js/Blob. [(js/JSON.stringify (clj->js { + :name name + :network network + :symbol "DVT" + :strategies [ + { + :name "erc20-balance-of" + :params { + :address state-bank + :symbol "DVT" + :decimals 18 + } + } + ] + :filters {} + :plugins {}}))])) + + +(re-frame/reg-event-fx + ::setup-snapshot + interceptors + (fn [{:keys [db]} [{:keys [:reg-entry/address :ens-name :name :state-bank] :as data}]] + (let [network (web3/version-network (web3-queries/web3 db))] + {:ipfs/call {:func "add" + :args [(build-snapshot-file name network state-bank)] + :on-success [::setup-snapshot-ens {:reg-entry/address address :ens-name ens-name}] + :on-error [::logging/error "Failed to upload data to ipfs" ::setup-snapshot]}}))) + + +(re-frame/reg-event-fx + ::setup-snapshot-ens + interceptors + (fn [{:keys [db]} [{:keys [:reg-entry/address :ens-name] :as args} {:keys [Hash]}]] + (let [namehash (ens/namehash ens-name)] + {:web3/call {:web3 (web3-queries/web3 db) + :fns [{:instance (contract-queries/instance db :ENS) + :fn :resolver + :args [namehash] + :on-success [::setup-snapshot-in-resolver {:namehash namehash :text (str "ipfs://" Hash) :reg-entry/address address :ens-name ens-name}] + :on-error [::logging/error [::setup-snapshot-ens]]}]}}))) + + +(re-frame/reg-event-fx + ::setup-snapshot-in-resolver + interceptors + (fn [{:keys [:db]} [{:keys [:namehash :text :reg-entry/address :ens-name] :as data} resolver-addr]] + (when (not (web3-utils/empty-address? resolver-addr)) + (let [active-account (account-queries/active-account db) + instance (web3-eth/contract-at (web3-queries/web3 db) abi-resolver resolver-addr)] + {:dispatch [::tx-events/send-tx + {:instance instance + :fn :setText + :args [namehash "snapshot" text] + :tx-opts {:from active-account} + :tx-log {:name "Setting snapshot to district" :related-href {:name :route/detail :params {:address address}}} + :tx-id {:setup-snapshot-for {:district address}} + :on-tx-success [::setup-snapshot-success {:ens-name ens-name}] + :on-tx-error [::logging/error [::setup-snapshot-in-resolver]]}]})))) + + +(re-frame/reg-event-fx + ::setup-snapshot-success + interceptors + (fn [{:keys [:db]} [{:keys [:ens-name] :as data} resolver-addr]] + {:dispatch [::check-snapshot data]})) + + +(re-frame/reg-event-fx + ::check-snapshot + interceptors + (fn [{:keys [db]} [{:keys [:ens-name] :as args}]] + (let [namehash (ens/namehash ens-name)] + {:web3/call {:web3 (web3-queries/web3 db) + :fns [{:instance (contract-queries/instance db :ENS) + :fn :resolver + :args [namehash] + :on-success [::check-snapshot-in-resolver {:namehash namehash :ens-name ens-name}] + :on-error [::logging/error [::check-snapshot]]}]}}))) + + +(re-frame/reg-event-fx + ::check-snapshot-in-resolver + interceptors + (fn [{:keys [:db]} [{:keys [:namehash :ens-name] :as data} resolver-addr]] + (when (not (web3-utils/empty-address? resolver-addr)) + (let [instance (web3-eth/contract-at (web3-queries/web3 db) abi-resolver resolver-addr)] + {:web3/call {:web3 (web3-queries/web3 db) + :fns [{:instance instance + :fn :text + :args [namehash "snapshot"] + :on-success [::check-snapshot-in-resolver-success {:ens-name ens-name}] + :on-error [::logging/error [::check-snapshot-in-resolver]]}]}})))) + + +(re-frame/reg-event-fx + ::check-snapshot-in-resolver-success + interceptors + (fn [{:keys [:db]} [{:keys [:ens-name]} text]] + {:db (assoc-in db [:district-registry.ui.core/has-snapshot? ens-name] (not (string/blank? text)))})) diff --git a/src/district_registry/ui/contract/district_factory.cljs b/src/district_registry/ui/contract/district_factory.cljs index a4360e5..5680ff7 100644 --- a/src/district_registry/ui/contract/district_factory.cljs +++ b/src/district_registry/ui/contract/district_factory.cljs @@ -2,6 +2,7 @@ (:require [bignumber.core :as bn] [cljs-web3.eth :as web3-eth] + [district-registry.ui.contract.ens :as ens] [district.ui.logging.events :as logging] [district.ui.notification.events :as notification-events] [district.ui.smart-contracts.queries :as contract-queries] @@ -15,14 +16,15 @@ (re-frame/reg-event-fx ::approve-and-create-district interceptors - (fn [{:keys [:db]} [{:keys [:name :deposit :aragon-id :tx-id]} {:keys [Name Hash Size]}]] + (fn [{:keys [:db]} [{:keys [:name :deposit :ens-name :tx-id]} {:keys [Name Hash Size]}]] (let [active-account (account-queries/active-account db) extra-data (web3-eth/contract-get-data (contract-queries/instance db :district-factory) :create-district active-account Hash - aragon-id)] + (ens/namehash ens-name) + (ens/normalize ens-name))] {:dispatch [::tx-events/send-tx {:instance (contract-queries/instance db :DNT) :fn :approve-and-call diff --git a/src/district_registry/ui/contract/ens.cljs b/src/district_registry/ui/contract/ens.cljs index 2e60618..475d8c4 100644 --- a/src/district_registry/ui/contract/ens.cljs +++ b/src/district_registry/ui/contract/ens.cljs @@ -3,6 +3,7 @@ [clojure.string :as str] [district.ui.logging.events :as logging] [district.ui.smart-contracts.queries :as contract-queries] + [district.ui.web3-accounts.queries :as account-queries] [district.ui.web3.queries :as web3-queries] [district.web3-utils :as web3-utils] [print.foo :refer [look] :include-macros true] @@ -29,24 +30,22 @@ (re-frame/reg-event-fx - ::check-availability + ::check-ownership interceptors - (fn [{:keys [db]} [{:keys [:aragon-id]}]] - (when (and (not (str/blank? aragon-id)) - (valid-ens-name? aragon-id)) + (fn [{:keys [db]} [{:keys [:ens-name]}]] + (when (and (not (str/blank? ens-name)) + (valid-ens-name? ens-name)) {:web3/call {:web3 (web3-queries/web3 db) :fns [{:instance (contract-queries/instance db :ENS) :fn :owner - :args [(namehash (str aragon-id ".aragonid.eth"))] - :on-success [::check-availability-success aragon-id] - :on-error [::logging/error [::check-availability]]}]}}))) + :args [(namehash ens-name)] + :on-success [::check-ownership-success ens-name] + :on-error [::logging/error [::check-ownership]]}]}}))) (re-frame/reg-event-fx - ::check-availability-success + ::check-ownership-success interceptors - (fn [{:keys [db]} [aragon-id result]] - {:db (assoc-in db [:district-registry.ui.core/aragon-id->available? aragon-id] - (or (= result "0x") - (= result web3-utils/zero-address)))})) - + (fn [{:keys [db]} [ens-name result]] + {:db (assoc-in db [:district-registry.ui.core/ens-name-owner (account-queries/active-account db) ens-name] + (= (str/lower-case result) (str/lower-case (account-queries/active-account db))))})) diff --git a/src/district_registry/ui/detail/page.cljs b/src/district_registry/ui/detail/page.cljs index 3242722..b6ec17a 100644 --- a/src/district_registry/ui/detail/page.cljs +++ b/src/district_registry/ui/detail/page.cljs @@ -89,7 +89,7 @@ :district/github-url :district/facebook-url :district/twitter-url - :district/aragon-id + :district/ens-name :district/logo-image-hash :district/background-image-hash :district/stake-bank @@ -115,6 +115,30 @@ [:img {:src "/images/district-bg-mask.png"}]]))))) +(defn- setup-snapshot-button [{:keys [:reg-entry/address :reg-entry/creator :reg-entry/status :ens-name :has-snapshot? :name :state-bank]}] + (let [active-account (subscribe [::account-subs/active-account]) + stake-tx-pending? @(subscribe [::tx-id-subs/tx-pending? {:setup-snapshot-for {:district address}}])] + (when (and (= has-snapshot? false) + address + creator + status + (= @active-account creator) + (= (normalize-status status) :in-registry)) + [:form.edit-district-button + [tx-button {:class "cta-btn" + :pending-text "Setting up Snapshot" + :pending? stake-tx-pending? + :on-click (fn [e] + (js-invoke e "preventDefault") + (dispatch [::district/setup-snapshot + {:reg-entry/address address + :ens-name ens-name + :name name + :state-bank state-bank + }]))} + "Set up Snapshot"]]))) + + (defn- edit-district-button [{:keys [:reg-entry/address :reg-entry/creator :reg-entry/status]}] (let [active-account (subscribe [::account-subs/active-account])] (when (and address @@ -142,7 +166,7 @@ :district/github-url :district/facebook-url :district/twitter-url - :district/aragon-id + :district/ens-name :district/total-supply :district/dnt-staked :district/stake-bank @@ -150,7 +174,7 @@ :reg-entry/created-on :reg-entry/address :reg-entry/creator]}] - (let [] + (let [has-snapshot? @(subscribe [::subs/has-snapshot? ens-name])] [:div.box-wrap.overview [:div.back-arrow {:on-click #(dispatch [:district.ui.router.events/navigate :route/home])} [:span.icon-arrow-right]] @@ -174,10 +198,11 @@ [:li (str "Voting tokens issued: " (format-number total-supply))]] [:nav.social [:ul - [:li - [:a {:target "_blank" - :href @(subscribe [::subs/aragon-url aragon-id])} - [:span.icon-aragon]]] + (when (= has-snapshot? true) + [:li + [:a {:target "_blank" + :href @(subscribe [::subs/snapshot-url ens-name])} + [:span.icon-snapshot]]]) (when github-url [:li [:a {:target "_blank" @@ -195,10 +220,19 @@ [:div.col.img [district-background background-image-hash]]] [:pre.district-description description] + [:div.form-btns + [setup-snapshot-button + {:reg-entry/address address + :reg-entry/creator creator + :reg-entry/status status + :ens-name ens-name + :has-snapshot? has-snapshot? + :name name + :state-bank stake-bank}] [edit-district-button {:reg-entry/address address :reg-entry/creator creator - :reg-entry/status status}]]]])) + :reg-entry/status status}]]]]])) (defn- stake-history-line [{:keys [:key :stroke]}] diff --git a/src/district_registry/ui/subs.cljs b/src/district_registry/ui/subs.cljs index d578d4d..68328a7 100644 --- a/src/district_registry/ui/subs.cljs +++ b/src/district_registry/ui/subs.cljs @@ -1,9 +1,11 @@ (ns district-registry.ui.subs (:require [district-registry.ui.config :as config] + [district-registry.ui.contract.district :as district] [district.format :as format] [district.ui.web3-accounts.queries :as account-queries] - [re-frame.core :as re-frame])) + [re-frame.core :as re-frame]) + (:require-macros [reagent.ratom :refer [reaction]])) (re-frame/reg-sub ::vote @@ -11,14 +13,20 @@ (get-in db [:district-registry.ui.core/votes (account-queries/active-account db) reg-entry-address]))) (re-frame/reg-sub - ::aragon-id-available? - (fn [db [_ aragon-id]] - (get-in db [:district-registry.ui.core/aragon-id->available? aragon-id]))) + ::owner-of-ens-name? + (fn [db [_ ens-name]] + (get-in db [:district-registry.ui.core/ens-name-owner (account-queries/active-account db) ens-name]))) + +(re-frame/reg-sub-raw + ::has-snapshot? + (fn [db [_ ens-name]] + (re-frame/dispatch [::district/check-snapshot {:ens-name ens-name}]) + (reaction (get-in @db [:district-registry.ui.core/has-snapshot? ens-name])))) (re-frame/reg-sub - ::aragon-url - (fn [_ [_ aragon-id]] - (str (format/ensure-trailing-slash (:aragon-url config/config-map)) aragon-id))) + ::snapshot-url + (fn [_ [_ ens-name]] + (str (format/ensure-trailing-slash (:snapshot-url config/config-map)) ens-name))) (re-frame/reg-sub ::active-account-has-email? diff --git a/test/district_registry/tests/smart_contracts/district_tests.cljs b/test/district_registry/tests/smart_contracts/district_tests.cljs index 4229278..bf474da 100644 --- a/test/district_registry/tests/smart_contracts/district_tests.cljs +++ b/test/district_registry/tests/smart_contracts/district_tests.cljs @@ -12,7 +12,7 @@ [district-registry.server.contract.registry-entry :as registry-entry] [district-registry.server.contract.stake-bank :as stake-bank] [district-registry.shared.utils :refer [reg-entry-status->kw vote-option->kw]] - [district-registry.tests.smart-contracts.utils :refer [create-district tx-error?]] + [district-registry.tests.smart-contracts.utils :refer [create-district tx-error? next-ens-name]] [district.cljs-utils :as cljs-utils] [district.server.web3 :refer [web3]])) @@ -25,8 +25,8 @@ (let [[creator staker1 staker2] (> (> (> (> (kw vote-option->kw]] - [district-registry.tests.smart-contracts.utils :refer [create-district tx-reverted?]] + [district-registry.tests.smart-contracts.utils :refer [create-district tx-reverted? next-ens-name]] [district.cljs-utils :as cljs-utils] [district.server.web3 :refer [web3]])) @@ -23,20 +23,19 @@ (let [[creator] (> (> (> (> (> (> (