Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 10 2017 22:42
    @jpitts banned @etherchamp1_twitter
  • Jun 05 2016 10:33
    @chriseth banned @adamskee
George Carder
@georgercarder

(also asked in compiler channel and they referred me here)

  • in assembly what is the storage location of return data?

  • put directly.. given the example below, what is location?

thanks in advance

given

... in contract

modifier defer(... args ..) {
  _;
  // want to use assembly here to access return data of modified function
  // so I imagine it'd be like
  bytes memory returnPtr;
  assembly {
    returnPtr := mload(location)
  }
   <Type> returnData;
   (returnData) = abi.decode(returnPtr, <Type>);
  // DO STUFF
}

function someFunction() defer(..args..) {
  if (monday) {
    return 42;
  } else if (tuesday) {
    return 32;
  }
  return 123;
}
Br4ndonP0nce
@Br4ndonP0nce
Yo hey guys, im having a dumb problem probably, i cant assign a value to a key in a mapping, if i do it thru a function it works but if i want to do it as the result of an if confitional it just returns 0
Tadashi
@htadashi

Hey masters. Is this $$ a special keyword of solidity ?

  function setContract(CoreContracts name, address contractAddress) public {
        require(msg.sender == DIRECTORY, $$(ErrorCode(UNAUTHORIZED_CALLER)));  <- this is the line with the "$$"
        contracts[uint256(name)] = contractAddress;
    }

Found in this contract

Oh nvm. Just found out the answer... is a command for solpp, a solidity pre-processor
贝克街的天才
@yuyenews

HI, please ask a question, my project directory structure is like this, now I need to upload the source code to https://etherscan.io

But https://etherscan.io doesn't seem to support source code validation for this structure, it only supports single file source code and multiple file source code in the same directory, and my source code is multiple files in different directories.

Do you have any solution to this problem?

image.png
image.png
贝克街的天才
@yuyenews
Here you can only select multiple files in the same directory at once
Roney
@Roney16325329_twitter
melbourne2991
@melbourne2991
do unused arguments end up in the transaction log?
I basically want an additional piece of data to operate on externally of contract. I know I could use an event for this, but wondering if I could just add an extra arg as a cheaper alternative?
berktaylan
@berktaylan
hello everyone , im newly intrested with smart contracts , i got a theorical question ( not coding or development help ) anyone can help me to understand something i dont know about smart chains
rxx
@rxx:converser.eu
[m]
which is the ethereum space?
João Vitor Ianuci
@joaoianuci
Hello guys, I'm new on solidity contracts - I have a problem doing a contract with mint number of 20K unique nfts, How I can check that an ipfs metadata already minted, there a way without a large loop?
Moody Salem
@moodysalem
hey yall... is the solidity baked in safemath the cheapest implementation?
1 reply
i'm finding switching from our implementation to the builtin makes operations more gas expensive
in addition, it added 500 bytes of bytecode
Merouane B.
@cryptofact
Hi, i’m looking to batch mint NFTs with the optimal gas fees, NFTs have single copy of each. Should I use ERC 721 or 1155 to do so ?
chriseth
@chriseth:matrix.org
[m]
what did you ure before?
Richard Zhang
@rrzhang139
Hi guys, do you consider scaling contracts to multiple contracts (maybe Factory design)? I'm worried that storing data on 1 contract will be costly
Perelyn Sama
@Perelyn-sama
Hey does anyone have a way to create a react dapp? I tried the truffle react box but I'm getting some errors
Nikolay Toplev
@nikolaytoplev0306:matrix.org
[m]
Hi, everyone. I would be grateful for who can help me with triggering function call in solidity per block on binance smart chain. Thank you in advance.
Code Chef
@devofficer
Does anyone know how to trigger function calls per block in solidity?
2 replies
Nikolay Toplev
@nikolaytoplev0306:matrix.org
[m]
Could you offer me a link to show how to do that?
2 replies
shibatoshinakamoto
@shibatoshinakamoto:matrix.org
[m]
hello can someone help me understand why i cant withdraw my token
even tho the solidity code looks safe
tried all slippage
Jonathan Gros-Dubois
@jondubois
Does Ethereum support adding custom data to transactions?
If so, how many bytes in a transaction?
melvillian
@melvillian:one.ems.host
[m]

Yes, you can include it on the “data” field of the transaction. I’m not sure of the number of the bytes but the limit is probably not a problem, unless you’re trying to share something huuuge like video or image content. Don’t do that on Ethereum, use IPFS for that.

See this SO question, and you need to add the “data” field to the transaction

https://ethereum.stackexchange.com/questions/87683/trying-to-send-a-transaction-with-ethers-js

nobodyzees
@RudiHarss_twitter

Have you heard about the upcoming Bitcoin Bankathon? It's an international hackathon with five challenges to tackle real world problems by building decentralized financial applications. It lasts from November 19th till December 8th and contains a total of 250,000USD-equivalent prizes. If you want to sign up for it, please visit the website: https://bitcoin-alliance.org/

You can build with any language that compiles to the EVM. This includes Solidity, Julia, and new or experimental programming languages such as Vyper.

iemwill
@iemwill

First of all, thank you Vitalik Buterin !

@Perelyn-sama i would define a dApp, decentralized Application, by now and here, you just need one Component as a smartContract.

To really understand, what a smartContract is, we’ll need some good „openMic“-Sessions, or some defining content.. leacked

Unite.

scdev157
@scdev157
Hi Guys
For following contract, if I change B, would it change bytecode of contract ?
I was assuming that due to treeShaking it should not
but when I changed B, bytecode also changed
Can you please explain ?
bytes32 constant a = bytes32(hex"1e8e1b45c8500eaae36dbdda78698134042397867d83fedc92005af7c108c793");
bytes32 constant b = bytes32(hex"9723a2a3c9b49f62a314da557d9f0e080f0af927614758f525c253a9cfd1597a");

library Lib {
    function aaa() internal pure returns (bytes32) {
        return a;
    }

    function bbb() internal pure returns (bytes32) {
        return b;
    }
}

contract HelloWorld {
    function fn() external pure returns (bytes32) {
        return Lib.aaa();
    }
}
sharp2448
@sharp2448:matrix.org
[m]
Hi there!!
I asked question on OZ forum but nobody knows...
Is there somebody brave enough who would like to check it and perhaps collaborate?
I'm sure it will also help lots of devs in the future...
https://forum.openzeppelin.com/t/token-timelock-tips-caveats-etc/18404
Víctor Hernández
@NanezX

Hey! I know this is specfic for solidity-devs, but maybe someone with more experience can help me. It's about some tools, mostly about hardhat and the compiler.

1. When i specified the compiler in hardhat.config. Is there any way to override an entire folder? I have one folder that have to be compiled with 0.6.12 and 1000 optimizer runs, and another with 0.6.12 but with 200 optimizer runs. In short: Can i do this with the entire folder? Or some ideas? lmao. I do not want to add every contract as override but if it the only way, ok(i already asked on Hardhat Discord yesterday)

2. Which values in the hardhat compiler we can say are default? I mean: i created the Input JSON description with Solt, and i copy the same settings that the I/O JSON in hardhat.config. The problem comes when i get a different bytecode compiling from the Solidity file with hardhat, and compiling with solc --standard-json (using the same version with hardhat btw). It's no problem with the "metadata hash" at the end of the bytecode - actually, i get the same metadata hash . It's really different on several points along the bytecode. These contracts are using abiEncoderV2 too. This problem doesnt happen with all the contracts. I not checked the bytecode from each contract, but until now - i see this difference only on the contracts with AbiEncodeV2. So, idk if Hardhat add some setting that are not "default". Could be that the reason that i get different bytecode? Or something else?

I really know that could be dense all these questions, but i really spend full time with my own research and still getting different bytecode with those contracts with AbiEncodeV2.

Thanks for any answer :)

Anique Hashmani
@anique:matrix.org
[m]
Hey
anyone here to help ?
aniquejapan
@aniquejapan
can anyone help me with solidity willing to pay Good amount.
Akachi
@trusteddev1409
Hi, everyone.
I am a senior solidity developer, do you need any help?
Ridoy Khan Rana
@RidoyKhanRana_twitter
This message was deleted
1 reply
nobodyzees
@RudiHarss_twitter
Only three days left till the start of the Bitcoin Bankathon!
https://bitcoin-bankathon.devpost.com/
ReLliM nIvEk
@KevinMi99582279_twitter
Hello.i.have a.private question about deploying on smart contracts ds feel more comfortable if I spoke in private if possible for legal purposes
Code Chef
@devofficer

Hello, everyone. I am about to test a Solidity code in hardhat, but I am not sure how to test the contract with IERC-20 in it's constructor parameters.
For example,
constructor(
IERC20 token1,
IERC20 token2
) {
}

Anybody to give me some advice of how to compile and test this?
Thank you in advance.

Code Chef
@devofficer
I am working on hardhat.
Can I write javascript test code for a smart contract deploying it on bsc testnet?
1 reply
ReLliM nIvEk
@KevinMi99582279_twitter
I have a question about smart contract deploying if anyone can kindly help me out here solidity
SuperUmam
@CaCaBlocker
Hi, everyone. I'm going to implement 'presale' for launching an NFT Game, but I don't have much knowledge about this. Could you teach me the process? What does smart contract do here? Thanks in advance.
nobodyzees
@RudiHarss_twitter

We are inviting developers, designers and entrepreneurs across the globe to participate in the first Bitcoin Bankathon to solve real-world problems by conceptualizing and building financial applications on Web3.

The hackathon lasts from November 19th till December 8th and contains prizes worth of 150,000 USD. Participation is possible online or on-site in El Salvador.

Building on RSK, any language that compiles to the EVM is supported. This includes Solidity, Julia, and new or experimental programming languages such as Vyper.

Website: https://bitcoin-alliance.org/en/
Discord: https://discord.gg/Ryh7tuMUnf

Jenny
@jenny_0509_twitter
Musk once said that using USDT to mine ETH in your Coinbase wallet is an exciting business (or sideline) opportunity. The difference with Defi mining is that there is no need to pledge any assets in the mining pool
Soorya L
@surya-04
hi guys