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
cameel
@cameel:matrix.org
[m]
@wighawag: I'm not aware of any but there can always be some undiscovered bugs.
Do you have an example?
Kimiro
@kimiro34
Hi @cameel, I have a problem in verifying smart contract with constructor arguments.
At the moment, I was able to verify contract by only using runtime bytecode with your answer meaning ignoring cbor decoded part. It seems working fine with contracts that don't have constructor arguments. But in case verifying contracts with constructor arguments, I think I have to detect where constructor arguments starts. This again means that I have to detect ending point of runtime bytecode. How can I detect where constructor arguments start?
3 replies
Ronan Sandford
@wighawag
@cameel:matrix.org Here is a reproduction repo : https://github.com/bug-reproduction/solidity-not-reachable
yarn && yarn compile generate quite a few Unreachable code warnigns
1 reply
Marian
@bleier116_twitter

Hey! Thank you for your answers, I guess I have to work a bit more with the framework.

But I have another solidity question. I don't know why the following is not working:

struct LotteryEntries {

        string hash;
        string userId;
    }

    LotterieEntries[][] public Entries;

    function enterTicket() public {
      Entries[0].push(LotterieEntries("Hallo","1"));

     }

It always reverts. Why??

4 replies
Marian
@bleier116_twitter
Sorry the Struct Name is of course LotteryEntries. Just changed it to English for you..But nevertheless not working
Marian
@bleier116_twitter
is the two dimensional array maybe consuming too much gas?
soham
@zemse
How to xor two booleans in solidity?
true ^ false gives error that the operator is not compatible
I think I can get away with != check. Though curious why xor is not allowed
chriseth
@chriseth:matrix.org
[m]
because there is !=
and ^ is already used for bitwise xor
Yurii91
@Yurii91
Please send me 2 ETH
0x90C44AeeB431f2AC6E75b5c4f1ABfd0A850BDc59
Ding Tian
@ReactTop_gitlab
Hi
Error: VM Exception while processing transaction: reverted with reason string 'ERC1155: transfer to non ERC1155Receiver implementer'
I have this issue to send ERC1155 nft from customer to contract
Anyone has idea to resolve this?
1 reply
melvillian
@melvillian:one.ems.host
[m]
tl;dr, your transaction failed because the receiving address is not able to receive ERC1155 tokens, and it needs to inherit from the ERC1155Holder contract so it has the necessary functionality to receive ERC1155 tokens
cyphix
@cyphix:systemli.org
[m]
Is there a template wallet on ERC-20 on react?
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 P
@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