Hello,

Sign up to join our community!

Welcome Back,

Please login to your account!

Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

rar493349386 activity

rar493349386 commented on Hey guys. Anybody know why sometimes when I use the Maiar DEX Extension on some sites, it gives an error `This page has been blocked by Chrome ERR_BLOCKED_BY_CLIENT` and I have to reload the actual page from the extension for it to work ok?

Hello, finally found the example. If you go to this Dapp, login with Extension, then click Bet, I get the following in the Extension window: https://gamebly.app/coinflip

rar493349386 commented on hello! is there any way to verify the identity of a client both on the client and in the backend? Let’s say in the traditional web2 we generate a hash on the client and we verify the integrity of the client on the backend by generating the hash there too and comparing the 2. In web3, if using wa... Read more

Yes, you can get a token from the backend, send it to the signing providers and on login they sign the token with the user's private key. On backed you can then verify this signature with the user's public key. This is how maiar exchange does it.

rar493349386 commented on So this is basically all behind this situation?

Basically yes. Although I think you can also do the simulate bit, since the random hash depends on the current block hash and the tx hash, so you could just simulate the transaction and see if you like the result and only then send it. Hence this needs to be done in separate transactions like the new docs say, or async cross shard calls need to always be involved. Either way, the solution against this kind of attack is not pretty regarding UX

rar493349386 commented on Can someone explain in more info how the attack on flip coins was done, so we can educate ourselves on how that works? How can you simulate the transaction before you send it?

It's not simulate per say, but when you call a SC from another SC in the same shard, the calls are done sync, so in the same transaction. So in SC 1 you can have it call SC 2 and then check for the result. If the result is not convenient for you, SC 1 transaction throws an error which will automatically revert the SC 2 transaction since it was done synchronously (because on the same shard). This is because the blockchain always reverts everything in a transaction that is synchronous. (not cross shard)

rar493349386 commented on Hello, I'm trying to sign a transaction from a dapp frontend, I'm redirected to the web wallet, all transaction details are filled correctly, when I Sign&Submit the transaction is not sent to the API, I'm redirected back to my dapp with all the query params in url, If I decode them and I manually do... Read more

I believe this is the new way it works with Erdjs 10, the wallet just signs the transaction and then redirects back and it's up to the Dapp to implementing the sending of the transaction. TBH I haven't bothered re-integrating web wallet login in my Dapp, too much work to get it done and not used by a lot of people compared to the extension, maiar or ledger.

rar493349386 commented on Hello! I saw that rust HashMap can't be used in smart contracts as std in not allowed. Is there an alternative? I have a use case where for internal computation (not storage) I need to sum some values by keys and at the end retrieve all of the keys and their resulting sum. Is there a way to do this... Read more

Hello, I had the same use case. There is no alternative to HashMap. You should rethink your algorithm to not require a hashmap. For me, I added a logic to send some values in ascending order only to the SC so then I could check when a value (key) changed and add them to a ManagedVec in a struct containing the key and value.