Fork me on GitHub

mornin’ been looking into cljs and crypto stuff for an assignment, and boy is that stuff complicated.


Good morning!


@hobosarefriends Is there a specific part that you find complicated?


In ethereum networks they have tokens which I’m having a hard time understanding the point of


Which tokens do mean? Not the coins I’m assuming…


That’s the part that’s confusing me… I’m not what they are. From what I’ve read so far it’s like casino chips for some reason, intermediate transaction currency type thing.


ERC20 tokens in particular at least


Well, originally there was only one, the “ether”. It was (and still is today) meant to pay for the cost of running the network. In other words: if you want to do transactions on Ethereum, you have to pay for those. The cost of the transaction is expressed in “gas”, and you pay for gas using those “ethers” that you have to buy (using real money). People quickly realised that they could, same as ether, easily create special-purpose-money for their own applications. And then it became a bit perverted because it was used as an investment tool: you would launch a new idea that involves Ethereum, you would create a token for that idea, and convince people to invest in your idea by selling them your token. This is what they call the ICO: “initial coin offering” (coin being another word for token). ERC20 is just a standard around tokens to get some interoperability.


It was amazing how easy it was to create your own token and collect loads of money a few years ago. I think (and hope) this has become a lot more difficult by now.


Another way of looking at tokens is similar to gift cards. You can buy a gift card using real money, and then that gift card is only usable for a specific purpose. If the shop decides to stop accepting them or change the value or conditions or whatever, they can do that. Not so with real money.


I guess that sorta makes sense..


More than “sorta” you’re not going to get from me, because I believe it doesn’t make too much sense myself. 🙂


Well I thought I needed a specific token to pay for gas because I kept getting an error that said: “gas required exceeds allowance (10000000) or always failing transaction”


but I should have more than enough if I work with rinkeby’s standard ethereum


oh no I can’t, because the thing I’m trying to do is funded by ERC20 tokens


Usually that means that there is a bug in the contract so that it has maybe an infinite loop or something?


(as in: usually when you’re programming your own smart contract)


I didn’t make the contract


It’s a sablier stream contract


Then maybe there is something wrong with the data that you’re putting into the contract?


The amount of gas needed for a transaction corresponds to the amount of computation needed to execute the smart contract. If it says it needs that much gas, something is wrong. So either there is a bug in the contract, or you’re giving it data that causes it to misbehave. Those are the options that I can think of at least.


It’s certainly better than my random guessing


for now I’m managed to get a token I can mint, so that works.

👍 3

I guess I’ll lower the deposit amount.. and reduce the time I suppose.


With your insight I got it to work, but only with a ridiculous amount of that secondary token


Thanks mate!


Oh I'm sorry, I barged into a conversation ;)


You’re welcome @hobosarefriends my pleasure!


No worries, it seems we were just done 🙂


And good morning to you too 🙂


@borkdude Now that we’re both here: I was wondering if you ever considered generating not only issue reports in CLJ Kondo, but also fixes. In editors it would be nice to have things replaced automatically, e.g. deleting unused imports, changing if to when when possible, etc.


That's not something clj-kondo will support for now, I leave that up to editor tooling. Clj-kondo reports the locations and also supports analysis output which some tools already leverage to rewrite code. E.g.


Right so if I understand correctly then Kondo already reports how things could be done differently on its API (in an auto-processable fashion)?


I’m writing a VSCode plugin that does this based on Kibit, that’s why I was thinking about Kondo as well.


yeah, the plugin could pick up on clj-kondo's output. Maybe take a look at carve how it does that. Calva also uses clj-kondo's analysis output


Yeah I know but I want not just the warnings, also the auto-fixing 🙂 Thanks for the pointer, I’ll look into it!


Maybe you can contribute your things to Calva at some point, would be cool to have one editor plugin that does it all


Definitely, that is my intent indeed. For now I’m doing it in isolation to keep it simple, but I certainly hope that it ends up being a part of Calva.


Since Calva already uses clj-kondo I don't think they will mind :)


No I already talked to them about it and they are all for it 🙂


👋 middag, watching the ‘event-driven microservices conference’ really the AxonIQ conference. Might be nice to use with Clojure as well.