I'm trying to code a DAO vault that only permissined contracts can call, how can i approve this from my DAO's contract
any sources for vault contracts?
Apr 24, 2023, 7:36 PM
contract Vault {
function transferFromVault(address _to, uint256 _value) external onlyAdmin returns (bool) {
transfer_(meta.vault, _to, _bpFeeBurn);
}
function ITransferFromVault(address _token, address _to, uint256 _value) payable external onlyAdmin returns (bool) {
require(
);
address _from = meta.vault;
}
function ITransferToVault(address _token, uint256 _value) payable external returns (bool) {
address _from = msg.sender;
return true;
}
}
function transferFromVault(address _to, uint256 _value) external onlyAdmin returns (bool) {
transfer_(meta.vault, _to, _bpFeeBurn);
}
function ITransferFromVault(address _token, address _to, uint256 _value) payable external onlyAdmin returns (bool) {
require(
);
address _from = meta.vault;
}
function ITransferToVault(address _token, uint256 _value) payable external returns (bool) {
address _from = msg.sender;
return true;
}
}
cant find any help on chatgpt or online
Apr 24, 2023, 7:37 PM
the OnlyAdmin modifier
update it to have checks for mappings of permissioned contracts/addresses
Apr 24, 2023, 7:46 PM
I've done that, my confusion is on how to approve the transaction in ITransfer
The function takes the token contract we are trying to use ERC20 transfer function on, and sends it from the vault, not msg.sender which would be someone else
Apr 24, 2023, 7:53 PM
maybe send a link or ss to the full contract
https://zora.co/collect/0x9d90669665607f08005cae4a7098143f554c59ef/mint
Thank me by sending me gas to mint oneπ
Thank me by sending me gas to mint oneπ
https://polygonscan.com/tx/0x93bd4a164443bbfa793b31a2d7b8d1d30de399ecb47c683230f9844f5695bb06
I didnt do this tx, then how come my matic got sent to that add
I didnt do this tx, then how come my matic got sent to that add
Is my wallet compromised??
Apr 24, 2023, 9:59 PM
If you didn't make that tx, yep
Apr 24, 2023, 10:01 PM
fk man I dont think I used this pK anywhere
Apr 24, 2023, 10:01 PM
Yeah it kinda sucks when it happens... You never understand where it's been leaked :(
Apr 24, 2023, 10:02 PM
man I just transferred in some matic for gas and now this
Apr 24, 2023, 10:03 PM
Can be a bug where you created the wallet, a virus on your PC, a keylogger... Lot of things :/
Apr 24, 2023, 10:03 PM
probably my device is compromised
Apr 24, 2023, 10:03 PM
When it happened to me (on a wallet I've used for test purposes), i never found the source
Apr 24, 2023, 10:03 PM
Im using pirated soft
Apr 24, 2023, 10:03 PM
Yeah put that hat in the drawer if you're working on web3 ππ
Apr 24, 2023, 10:04 PM
cant afford og software lol
we're poor
Apr 24, 2023, 10:05 PM
Then use a VM for web3, or another device with clean software
Apr 24, 2023, 10:05 PM
π₯²
wish I could
Apr 24, 2023, 10:06 PM
http://officercia.mirror.xyz/p1ieZdxQWH4yHCNOXNPHyT8So1cY0X_wMGKwdmavi7s
Follow officer cia for all the tips
Apr 24, 2023, 10:06 PM
Okay
Apr 24, 2023, 10:06 PM
He's one of the best around imho if not the best
https://t.me/officer_cia
Apr 24, 2023, 10:07 PM
haha cant hire man
Apr 24, 2023, 10:07 PM
No need to hire him, you can study on his articles
Apr 24, 2023, 10:08 PM
Oh okay thanks, I am going through them
but is there like any way to not abandon that wallet and somehow getting to regenerate a diff pk?
Apr 24, 2023, 10:10 PM
One account = one pkey so nope
You can still use it at your own risk
Apr 24, 2023, 10:11 PM
man I wanna beat this guy
got so much brain to setup all this but can't do hardwork and earn
π‘
Apr 24, 2023, 10:12 PM
I have a question for you or anyone that knows. I use an android phone with trust wallet and metamask. Is it possible to get my crypto stolen via APKs or some other kind of malware?
Apr 24, 2023, 10:56 PM
I dont take the chance, personally, but I can't say I have heard about any android malware specifically targeting wallets
on iphones, I know there were cases where the MM instance was getting backed up, so if your icloud password got leaked, a scammer could "restore" your wallet to their device
Apr 25, 2023, 3:36 AM