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
prberg
@prberg:matrix.org
[m]

Is it possible to use interface functions as types?

e.g.

interface Foo {
    function myFunction() external;
}

contract Contract {
    function myOtherFunction(Foo.myFunction func) external;
}

The code above does not compile

3 replies
amazed
@amazed:matrix.org
[m]
I will definitely try it out in my personal projects, I just don't think it's ready for production yet, especially because so many people are used to writing tests in js/ts
I do hope it does well though, writing test in solidity is pretty cool
Rakesh chandra verma
@vermarakesh2005_twitter
how can I save our solidity contract locally
1 reply
amazed
@amazed:matrix.org
[m]
What did you use to write the contract, and what do you mean exactly by locally?
Rakesh chandra verma
@vermarakesh2005_twitter
I want to configure local workspace with Remix Online IDE. Is it possible ?
1 reply
Shivam Purohit
@shvamabps
I am new to the blockchain environment. can anyone tell me what are the use cases of web 3 in today's scenario?
2 replies
Jerome P.
@dappconsulting
Hi. Where's the biggest/best groups for blockchain/web3/solidity dev chat, networking, collab etc? Any ideas? I'm new to Gitter and Element/Matrix...
3 replies
Paul Peregud
@paulperegud
@prberg:matrix.org While I agree that foundry clearly kicks ass, user does not need to write scenarios for echidna. And you need to write scenarios when using foundry's fuzzing. On "detecting failure" front one needs to write invariants for both tools. So, apart from close integration with foundry, echidna seems to be strictly superior to foundry's fuzzing tool.
Vincent Darren
@Vincent_Darren_gitlab
This message was deleted
1 reply
May the Bytes Be With You
@maythebytesbewithyou
Yo, all! I'm new to this channel, but not to Solidity. Got about one year of experience with Solidity by now, and have fallen in love with Web3 / DApp smart contract development. Just wanted to drop in and say hi for now! :) Hope this channel will help me expand my knowledge on the subject. ;)
May the Bytes Be With You
@maythebytesbewithyou
Oh, and may the bytes be with you! :D
Alexander John Lee
@partylikeits1983

Hello all, sharing the complex number library I wrote for solidity: https://github.com/partylikeits1983/num_complex_solidity

Here's an example of finding the natural log of i.

contract model {
    Num_Complex Complex;

    Num_Complex.Complex a = Complex.wrap(0, 1e18);

    function test() public returns (Num_Complex.Complex memory) {

        Num_Complex.Complex memory result = Complex.ln(a);

        return result;
    }
}

However, currently there are some limitations to the library. Currently, complex numbers are handled in a struct as elementary user defined type and do not use the user defined type functionality that was added in Solidity version 0.8.8.

I was wondering if in the future it would be possible to define a custom type in solidity as struct instead of only the built in value types. Currently it is not possible to add two data types to a user defined type, which would be useful for complex numbers.

For example, it would be useful if it was possible to define a type as:

Struct Complex {
    int re;
    int im;
}
type complex is Complex;

To get around the added abstraction of using a struct to contain two ints, I thought of splitting a int256 into two int128 parts the first 128 bits being the real part and the last 128 bits the the imaginary part of a complex number, however, I believe this would increase complexity and introduce new bugs.

Would be grateful for feedback!

2 replies
cameel
@cameel:matrix.org
[m]
If you needed to cram more info there, struct would probably be the only option though.
The plan is for operators to eventually work with structs too, but that's for some future release.
Pytheas
@Pytheas01
Hello, I would like to create a POC contract to manage Data Scientist licenses. This contract would allow managers to buy n licenses for their Data Scientists, and handle stock management. Is Solidity the right tool for this? Many thanks.
Rahul Sharma
@RahulSh92547538_twitter
Hi all I am looking for an auction smartcontract written in Solidity language, if anyone have please send it to me , i will be very helpful to you for this.
May the Bytes Be With You
@maythebytesbewithyou
https://solidity-by-example.org/app/english-auction/ - Here's an example of an English auction. Think the Solidity documentation has one too.
This is for NFTs.
Nuno Santos
@nunofilipesantos:matrix.org
[m]
We do have examples in our docs, you can find it here: https://docs.soliditylang.org/en/latest/solidity-by-example.html#blind-auction
Dhruval Golakiya
@DhruvalGolakiya
Hello, I'm new to blockchain and currently learning Web and I want to know about what is Cosmos anyone know or used it like for what purpose, sorry for this dumb question but I'm new to blockchain so just trying to understand everything
Muhammad Hassan
@mdothassan_twitter
Hi guys, thanks to @leonardoalt for helping us out. We wrote a blog post on using SMTChecker and extracting the SMTLIB2 format. Maybe it helps someone in future: https://www.truscova.com/blog_article_5.php
Pytheas
@Pytheas01
Hello, has anyone created a contract to manage, say, software licences?
I'd like to know if using Solidity for such purpose is over- or underkill. You'd have to manage licence keys, licensor names, ...
Rahul Sharma
@RahulSh92547538_twitter
Hi everyone, can anyone let me know from where can i learn Solidity in depth knowledge..๐Ÿ˜Š any links , any github profile , any Solidity related projects please send it to me i will be very thankful to all for this.
May the Bytes Be With You
@maythebytesbewithyou
@RahulSh92547538_twitter Documentation: https://docs.soliditylang.org, Solidity by Examples: https://solidity-by-example.org/, Curated list from GitHub: https://github.com/NightKari/awesome-solidity, Smart Contract Programmer YouTube Channel: https://www.youtube.com/@smartcontractprogrammer - are some good resources, I think. :)
Depends on what you need to know, there are plenty of great resources for this :)
Stephanie Russo
@Stephan01766771_twitter
Hello all, I'm attempting to swap BNB token (0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c) for LCP token (0x7150363247D59F1539C5D2Af5E9b743Be07e2F8B) using this contract https://bscscan.com/address/0x71194cfd646f87fa9daeba0f7f21ad872d96da0f#writeContract and i'm getting an error could someone tell me what i'm doing wrong? I'm using function #9 with these values;
  • first field 10000000000000000
  • second field [10000000000000000, 0, [0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c, 0x7150363247D59F1539C5D2Af5E9b743Be07e2F8B], my_wallet_address_here, 1674926203]
  • third field 25000000000000
Rahul Sharma
@RahulSh92547538_twitter
Thanks @maythebytesbewithyou
CryptoFiaz
@CryptoFiaz
@maythebytesbewithyou are you Solidity Dev ?
Ankit Tiwari
@Ankitvnsbihar
hey i am new here in community please guide me what should i do here is my github-https://github.com/Ankitvnsbihar
Ankit Tiwari
@Ankitvnsbihar
I want to contribute
1 reply
Dhruval Golakiya
@DhruvalGolakiya
(bool success, ) = owner.call{value: address(this).balance}(""); can anyone explain me what this line do
Ankit Tiwari
@Ankitvnsbihar
Bro it is call function in solidity
Nuno Santos
@nunofilipesantos:matrix.org
[m]

๐Ÿ‘‹ Our 1st Community Call of 2023 is this week!

During the call, you'll have the opportunity to:
๐Ÿ’ป๏ธ Learn about operators for user defined value types.
๐Ÿคš Ask questions and give feedback to the Solidity Team

Join us Wednesday, February 1st at 15 CET
https://twitter.com/solidity_lang/status/1620093589568253954?s=20&t=fptYnlA9kTEZBFhhpuCEPQ

Vincent Darren
@Vincent_Darren_gitlab
Dm for more info +โ‘ (โ‘ขโ‘ฃโ‘ฅ)โ‘คโ‘กโ‘ฅ โ‘ฅโ‘คโ‘ฆโ‘ค
Nuno Santos
@nunofilipesantos:matrix.org
[m]
Feel free to join us in 3 minutes here: https://meet.ethereum.org/solidity-community-call-monthly
Victor Naumik
@vicnaum
Is there a way to remove unused param names from the function definition, but still be able to call it via Named Params?
interface IRoyalties {
  function getRoyalties(uint256 tokenId, uint256 tier) public view returns (uint256);
}

contract MyRoyalties is IRoyalties {
  uint256 FIXED_ROYALTIES = 1000;
  function getRoyalties(uint256 /* tokenId */, uint256 tier) public view returns (uint256) {
    return FIXED_ROYALTIES * tier;
  }

  function useRoyalties() public {
    uint256 royalties = getRoyalties({
      ????: 0, // <<-- This will not compile
      tier: 2
    });
    // do something with royalties
  }
}
1 reply
Just want to combine both :)
1) Have 0 compiler warnings
2) Enforce using Named Params in all function calls of the project
Victor Naumik
@vicnaum
Or maybe there's at least some way I can silence the unused-parameter-warning with a comment or smth?
Nuno Santos
@nunofilipesantos:matrix.org
[m]

We just released Solidity 0.8.18! ๐Ÿš€
This version includes the following notable features:

  • Disabling CBOR metadata
  • Support for Paris Hardfork
  • Deprecation of selfdestruct
  • Change in EVM bytecode generation from Yul

We have also included 11 bugfixes! ๐Ÿž

๐Ÿ“– https://blog.soliditylang.org/2023/02/01/solidity-0.8.18-release-announcement/
๐Ÿ’พ https://github.com/ethereum/solidity/releases/tag/v0.8.18

cameel
@cameel:matrix.org
[m]
Why is the argument unused though? This does not seem to be a virtual function, so it's not like something that was used in the base and not needed in derived.
chriseth
@chriseth:matrix.org
[m]
You could use a different way to get rid of the warning like assigning the variable to itself
Pascal Marco Caversaccio
@pcaversaccio
GLIBC version is creating some issues on WSL for 0.8.18 ethereum/solidity#13921
at least for the Ubuntu 20.04.5 LTS version
not sure how to resolve it honestly
Thomas Ken
@thomas0114
Hi.
I'm a senior full-stack and blockchain developer looking for new opening position or projects.
I have over 10 years of experience in building websites and 4 years of experience in blockchain technology.
I have strong experience with react.js/next.js/vue.js & material ui/styled-compoents/figma design for frontend and node.js/express.js for backend development.
Also I'm highly experienced with web3 integration with smart contracts, harthat/truffle/remix, building dapps(defi/dex/dao), NFT marketplace, so I have been working in blockchain field for recent 4 years.
Check it and DM me if you're interested.
Kindly awaiting for your response.
Pedro Lionel Marsetti
@Xpedr2
Hi there, I am learning Solidity with the Solidity Documentation Release 0.8.19 February 5th 2023. I am willing to get a job, am I in the right path? Do you have any recommendations for me? Thank you all. Cheers.
Parth Kasrale
@Parth-Kasrale
hi folks just stepped in empire of solidity anyone just for guidance explain in 5 steps to get a solid grasp with solidity
Jules G
@JulesGoullee_twitter
Hey, I would like to split bytes memory in a similar way as bytes calldata: msg.data[from:to], any clue how I can accomplish this?
0xDD
@0xDDem_twitter
Hello Can someone point me to some documentation for interface IModule from versions 0.6? I dont understand how to write or set up a Proxy contract that uses an implementation that uses modules.