Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Oct 10 2017 22:42
    @jpitts banned @etherchamp1_twitter
  • Jun 05 2016 10:33
    @chriseth banned @adamskee
ERC721 is a real NFT. ERC1155 can be NFT-like or fungible tokens, and mainly is there because you can have different kinds of tokens in one token contract
Hey guys
I'm stuck recovering signer of a typedData(EIP712) in solidity
I've deployed a minimal version of rarible-protocol
const DOMAIN_TYPE = [
        type: 'string',
        name: 'name'
        type: 'string',
        name: 'version'
        type: 'uint256',
        name: 'chainId'
        type: 'address',
        name: 'verifyingContract'

const domainData = {
    name: 'Market721',
    version: '1',
    chainId: '1337',
    verifyingContract: '0x296564F6260b95f99F93fB347d456b7FC825771b'

const OrderTypes = {
    AssetType: [
        { name: 'assetClass', type: 'bytes4' },
        { name: 'data', type: 'bytes' }

    Asset: [
        { name: 'assetType', type: 'AssetType' },
        { name: 'value', type: 'uint256' }
    Order: [
        { name: 'maker', type: 'address' },
        { name: 'makeAsset', type: 'Asset' },
        { name: 'taker', type: 'address' },
        { name: 'takeAsset', type: 'Asset' }

const createTypeData = (domain, primaryType, message, types) => {
    return {
        types: { EIP712Domain: DOMAIN_TYPE, ...types },
const leftUH = {
        maker: "0xfa6954192c3087f9143f5401f7804b405ac84ca5",
        makeAsset: {
            assetType: {
                assetClass: id('ERC20'),
                data: web3.eth.abi.encodeParameter('address', '0xfa6954192c3087f9143f5401f7804b405ac84ca5')
            value: BigNumber("100000000")
        taker: "0x3bed4334ce380cfe41363c7e875a9fc1769578b1",
        takeAsset: {
            assetType: {
                assetClass: id('ERC721'),
                data: web3.eth.abi.encodeParameter({ root: { contract: "address", tokenId: "uint256" }}, { contract: '0xfa6954192c3087f9143f5401f7804b405ac84ca5', tokenId: 1 })
            value: "1"
const leftMsgParams = createTypeData(domainData, 'Order', leftUH, OrderTypes)
    const leftSig = sigUtil.signTypedData_v4(Buffer.from(leftAcc, 'hex'), { data: leftMsgParams });
const resault = await market.matchOrders(leftUH, leftSig, rightUH, rightSig);
and when I recover signer in solidity it doesn't match with order.maker which is signer of the order
Ding Tian
Who can explain about EIP-2981 exactly?
Hey! friend.
I am a cryptocurrency investor and a confidential currency mining machine salesperson.
Our company currently sells BTC, ETH, FIL and other mining machines. At the same time, celebrate the first anniversary of Filecoin's launch on the mainnet. 🤜🤛
Currently, there are discounts for mining machines. Filecoin is the only digital certificate of IPFS, and its value will be very high in the future.
Interested friends can scan the QR code to add my contact information.
Hi, everyone. Please check the contract and I'm happy if you let me know why it has higher than normal gas fee for buy/sell.
hi, is there any discord for solidity or this is the main group?
Danny Pr.

Hi I'm actually doing an online course and I'm developping on nextjs but I have this poblem on my web3.js code :Server Error
ReferenceError: window is not defined

This error happened while generating the page. Any console logs will be displayed in the terminal window.
eth/web3.js (3:0) @ eval

1 | import Web3 from "web3";
2 |

3 | window.ethereum.request({ method: "eth_requestAccounts" });
4 |
5 | const web3 = new Web3(window.ethereum);
6 |

we are so sorry to hear about your situation you can contact eth@consultant.com for any issu
Luis Schliesske

Hi @cameel:matrix.org I read in the docs:

block.basefee (uint): current block’s base fee (EIP-3198 and EIP-1559)


It's a bit ambiguous as to whether this is the base fee of the previous block or the current block that this transaction will be included in.

Is it the basefee of the block that the transaction is included in?

1 reply

Also I wondered what's the best way to get the value for the transactions priorityFee?

Is it: tx.gasprice - block.basefee ?

1 reply
@dannpr: Are ya importing web3.js within a browser or server context?
Hi, everyone.
I don't know if I can ask such a question here. I apologize first.
I am learning about Ethereum development. I'm interested in instant messaging based on Ethereum or other blockchain platforms, but I don't know much because I'm a novice. If I want to develop an end-to-end instant messaging based on blockchain, what technologies should I learn? Or is there a project recommendation?
My English is very poor, so the above comes from the translator. If there are sentences that are not smooth, I'm so sorry!!!
3 replies
First learn solidity, ethereum programs are all smart contracts. As for the instant messaging you mentioned, it should be a new way of playing smart contracts, just check it out when the time comes.
1 reply
Ethereum Wallet with ERC20 support (GitHub). A simple interface that allows users to transfer tokens after selecting which ERC 20 token they would like to send?
Ding Tian
Hi everyone . is there any contract code to accept BUSD ?
Hello guys, i'm trying to understand the source code of reflect.sol
anyone has an useful documentation or guide or tutorial? thanks
@nuzzep_twitter: Not answer questions here
bunch of questions and not one answer
Dumb canal
is there a gas efficient way to reset a uint256 -> uint256 mapping?
1 reply

Hi all...

I am trying to get my head around ERC223

Thank you in advance
Luis Schliesske
thx for the help @hrkrshnn:matrix.org
Hi everyone. I'm manager and know nothing about smart contracts. Developer in my team is looking for examples of complex or not standart smart contracts for Ethereum (Solidity) or Tron. If you know some examples I will be very glad to recive link.
CryptoMax 𝖈𝖗𝖞𝖕𝖙𝖔𝖒𝖆𝖝
Hi is there a efficient way to convert address to string memory?
what would you like the conversion to perform?
translate to a hex string?
CryptoMax 𝖈𝖗𝖞𝖕𝖙𝖔𝖒𝖆𝖝
something like "0x66aB6D9362d4F35596279692F0251Db635165871"
there should be some helper libraries out there that perform hex encoding, but I would not recommend it. Is it for an error message?
CryptoMax 𝖈𝖗𝖞𝖕𝖙𝖔𝖒𝖆𝖝
TypeError: Explicit type conversion not allowed from "address" to "string memory".
string(attr) doesnt work in 0.8.9
you have to perform the translation from binary to hex
how should the compiler know in which way you want to convert the address to a string?
CryptoMax 𝖈𝖗𝖞𝖕𝖙𝖔𝖒𝖆𝖝
in a default way that every wallet do.
it's so weird that solidity does not provide default string conversion
the reason is that it's horribly expensive
why do you want to do it?
Hi, I'm making a NFT marketplace. I have deployed the smart contracts on the polygon mumbai testnet. The NFTs are minted on the mumbai testnet itself. But I want the users to buy the NFTs in ether, how do I do that?
2 replies
Lauri Peltonen
If the ERC20 has decimal information, it should be in the "decimals" property. If it doesn't have, you can consider the value zero

Hello everybody, I am very new in Solidity and also in JavaScript. I finished the CryptoZombies tutorial (maybe you know that) and now I am just playing around a bit to display some things via Javascript.

I have the following problem: I have an array where some parameters as "name" "age" etc are stored and a mapping where it is stored which array entry belongs to which user. So there are more than one entry per address possible.

My problem now is, if I want to display it and I use a "while"-pattern, the while pattern is finished before the results from the smart contract querys are there. And also the results from the smart contract array are not always available in the order requested. so an example:

according to the mapping array entry 0, 3 and 4 belong to some specific address.

so i implemented a while pattern and requested entrys 0, 3 and 4 of the array in the contract but results got in order 3, 0, 4. From MySQL and PHP what I learned several years ago the results are always presented in the order you wanted them. Any suggestions?