What is this adminRole supposed to be? An address? Or a hashed value of something? What is it?

May 3, 2021, 9:27 AM
Check it out on this page: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/structs/EnumerableMap.sol
create2 is not necessarily a real deployment. It first calculates the address if it were deployed, as far as I know.
May 3, 2021, 11:19 AM
Nope..I believe its a new opcode that is specifically designed to deploy new contract.

Estimating contract address is just one of its effective features.
May 3, 2021, 11:21 AM
it can predict an address as well as do a deployment. What makes create2 outstanding is something called counterfactual deployment.
May 3, 2021, 11:27 AM
I have the same understanding, this new opcode should deploy contract always to the same address (as long as the bytecode and salt do not change). the deployment is successful but I do not see the tab where to verify the contract and also an automated request to etherscan api does not work
May 3, 2021, 11:27 AM
It means one can get the address first without doing a deployment. Of course, a contract can be later deployed to that address.
May 3, 2021, 11:27 AM
some docs about this?
May 3, 2021, 11:34 AM
https://docs.openzeppelin.com/cli/2.8/deploying-with-create2
May 3, 2021, 11:37 AM
merci
Guys Events cost gas fees right?
So if I have an array is better to emit once the cicle is ended
thanks
May 3, 2021, 1:39 PM
According to the AccessControl contracts of OpenZeppelin...
Tge AdminRole or another role is a keccak256 hash
May 3, 2021, 1:54 PM
cryptozombies
May 3, 2021, 2:55 PM
Well, if it's a bytes32 viable, it's most likely a hashed value. The question is a hashed value of what? Address? A string?
May 3, 2021, 3:10 PM
reflective finance
bot?
May 3, 2021, 5:57 PM
A custom String
Like I define a role as "MANAGER" and create a hash of it
and check weather the caller has this role assigned or not
May 3, 2021, 6:21 PM
So how to prevent price dumping once provided liquidity for your own token
Is there a way to calculate slippage for a token?
May 3, 2021, 8:22 PM
I'm not quite sure of the calculation, but watch that video it explains it to some extent but not in detail. Slippage is mentioend e.g. on Pancake Swap or Uniswap when you do the trade under price impact
and of course the speed of your transaction going in is part of the slippage too.. if someone moves the price before you get in you need to have slippage set to allow for that trade to execute, or as a safety net it will not if you do not allow sufficient slippage.
May 3, 2021, 8:37 PM
yes I know also that slippage is higher for lower liquidity right?
May 3, 2021, 8:38 PM
It depends on how much you are swapping
its a function of the amount you are trying to swap vs the liquidity that exists in the pool.
maybe this sheet can help
did a link come through?
does this chat remove links or something?
May 3, 2021, 8:40 PM
I don't knoe
but you can try posting without dots
May 3, 2021, 8:41 PM
docs google com/spreadsheets/d/1tfNoKooe66Jz5ltA-vEmE3f6EKCpLmNI1uBDwf5wHII/edit#gid=0
May 3, 2021, 8:42 PM
merci
May 3, 2021, 8:43 PM
np.
Np, thanks same to you
oh, ok... will be better tomorrow then heh
May 3, 2021, 9:08 PM
))
May 3, 2021, 9:10 PM
Are you sure?
struct RoleData {
mapping (address => bool) members;
bytes32 adminRole;
}

mapping (bytes32 => RoleData) private _roles;

bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
The bytes32 in the mapping(bytes32 => RoleData) is what you described for sure. I'm not sure about adminRole. It would be redundant if it were for a hashed value of a ROLE string.
May 4, 2021, 12:22 AM

© 2024 Draquery.com All rights reserved.