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
Aiden_Ed
@aiden_ed:minds.com
[m]
Hi!
Are you looking forward to making more profits from cryptocurrency investments?
βœ…Here is a reliable cryptocurrency investment platform for you! Link in my bio.
Create an account today and start earning πŸ’― https://echelon-capital.org/?ref=Create
Ehsan Shadmehri
@ehsansh
Hi everyone. I am a web developer and I started to learn solidity. I want to know what are the job opportunities for smart contract developers? How could I make money with smart contracts or dapps?
Aiden_Ed
@aiden_ed:minds.com
[m]
Hello!
Are you looking forward to making more profits off crypto currencies investment?
βœ…Here's a reliable crypto currency investment platform for you! Link in my bio.
Create an account today and start earning πŸ’― https://echelon-capital.org/?ref=Create
Hello!
Are you looking forward to making more profits off crypto currencies investment?
βœ…Here's a reliable crypto currency investment platform for you! Link in my bio.
Create an account today and start earning πŸ’― https://echelon-capital.org/?ref=Create
Hello!
Are you looking forward to making more profits off crypto currencies investment?
βœ…Here's a reliable crypto currency investment platform for you! Link in my bio.
Create an account today and start earning πŸ’― https://echelon-capital.org/?ref=Create
Hello!
Are you looking forward to making more profits off crypto currencies investment?
βœ…Here's a reliable crypto currency investment platform for you! Link in my bio.
Create an account today and start earning πŸ’― https://echelon-capital.org/?ref=Create
Solidity Wiz
@soliditywiz
Does anyone know what the minimum is you can make minting for a nft contract? im trying to do 0.006 but for some reason whenever i try to mint from the contract it gives me a crazy gas fee
ophil
@ophilon
hi colleagues. I'm new here, my 1st question how to block above spammer user ?? I reported him, is this enough ??
Peteris Erins
@Pet3ris
Does there happen to be a source map visualiser for Solidity? Something like godbolt or objdump -C that is not attached to a transaction but for a contract overall?
cameel
@cameel:matrix.org
[m]
ok. so as I thought.
ccolorado
@ccolorado
Hi there, I have 2 questions
  1. What is cheaper reading address _StorageVariable or address(_contractInstanceOnStorage)
  2. Are there tools comparing gas consumption ?
hrkrshnn
@hrkrshnn:matrix.org
[m]

@ccolorado: They should both be the same, at least after optimization.

The easiest way to compare is writing two different contracts, both with a single function that does what you want to do. They call each of them and compare the costs. Make sure that the optimizer is turned on, otherwise, the comparison can be meaningless. Often users incorrectly writes two functions in the same contract and compares the gas, but this is incorrect because the order in which the function appear in the function dispatch can influence this.

Maybe https://www.npmjs.com/package/hardhat-gas-reporter can be useful in testing. Otherwise, something as simple as Remix should do.

ccolorado
@ccolorado
@hrkrshnn:matrix.org I was looking for some tool that didn't required so much boileplating, but I think this is probably what is available now.
Is there any service that will let me run a node with a forked version of mainnet ? Something that can be available to a distributed team (instead of ganache)
1 reply
tochi
@tochi_e_twitter
I am looking to hire Rust developers for my Startup. Is this the right place?
Kamlesh Parikarath
@kombos
guys, quick question, can we call another contract's function inside a contracts initialize (constructor) function ?
S0AndS0
@s0ands0:matrix.org
[m]
@tochi_e_twitter: If there's an urgent need for developers, then it may be worthwhile to re-post on the IT-Jobs Channel too
@kombos: Yes, it is even possible to initialize other contracts within the constructor function.
Parv Garg
@parv3213
Hi there,
I am upgrading my contracts using a proxy pattern. I want to delete the implementation of a few old functions. What is the best way? As of now, I have just added a modifier that always reverts.
realisation
@realisation
What do I do if I want to include natspec with a multi line explanation?
    /// @notice Takes in the open interest and appllies Overlay's monetary policy
    /// @dev The impact is a measure of the demand placed on the market over 
    /// @dev a rolling window.
do I need a second @dev on the next line or do I just make a new line?
chriseth
@chriseth:matrix.org
[m]
just use a new line
smrpn
@smrpn:matrix.org
[m]
what does constructor() { owner = payable(msg.sender); } mean in a contract?
chriseth
@chriseth:matrix.org
[m]
the payable(...) converts an address to an address payable
it means you are declaring that msg.sender can receive ether
θ΄ε…‹θ‘—ηš„ε€©ζ‰
@yuyenews
Record the creator when the contract is initialized
smrpn
@smrpn:matrix.org
[m]
okay, so here msg.sender is the address who is calling the contract?
θ΄ε…‹θ‘—ηš„ε€©ζ‰
@yuyenews
yes
smrpn
@smrpn:matrix.org
[m]
how do i get the address which deployed the contract?
i'm making a nft marketplace, and i want to transfer a percentage of the sale to the contract owner
chriseth
@chriseth:matrix.org
[m]
in the constructor, msg.sender is the deployer
θ΄ε…‹θ‘—ηš„ε€©ζ‰
@yuyenews
View the value of the owner variable of the contract on the block browser. If the contract was deployed by you, then the contract owner is the address of the wallet you used to deploy the contract.
1 reply
smrpn
@smrpn:matrix.org
[m]
ohhh
okay, how do I get this address in my solidity contract?
like, is there any way i can get that address using an inbuilt function?
θ΄ε…‹θ‘—ηš„ε€©ζ‰
@yuyenews
Not quite sure what you mean, are you trying to get the owner of another contract in your contract?
2 replies
θ΄ε…‹θ‘—ηš„ε€©ζ‰
@yuyenews
image.png
smrpn
@smrpn:matrix.org
[m]
thanks
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?