skalenetwork/skale-manager

Restrict originator to be only PK, but not smart contract

sync-by-unito opened this issue · 2 comments

Currently we can pass any address to originator field, this may cause errors when we(or future users) will pass smart contract address to this field

┆Issue is synchronized with this Jira Task
┆Attachments: image-20220117-111710.png

➤ Dmytro Stebaiev commented:

https://github.com/skalenetwork/skale-manager/blob/develop/contracts/Schains.sol#L369 ( https://github.com/skalenetwork/skale-manager/blob/develop/contracts/Schains.sol#L369|smart-link )

Originator address must be not a contract error is raised if originator is a smart contract on mainnet.

➤ Oleksandr Salamatov commented:

Verified
manager: 1.8.2-develop.62
Metamask warns that tx (where originator is SC) will fail
If ignore warning and send tx, it will stuck and after that will be failed
(screenshot because rinkeby etherscan deletes failed txs)

!image-20220117-111710.png|width=1408,height=682!