Open danoctavian opened 4 years ago
This would require managing LINK funds per individual vendor. Payments using a particular ERC20 token can be achieved by using
a call to approve
before calling the contract with this:
then the contract can claim the funds with a call such as this:
IERC20.IERC20 erc20 = IERC20.IERC20('token_address');
require(erc20.transferFrom(msg.sender, address(this), value), "Transfer failed");
solving as part of this https://github.com/sugarskins/csgo-steam-eth-trade/pull/17/files
Currently the contract is assumed to be unique per vendor since the vendor (owner) deposits LINK in order to request chainlink oracles to validate item delivery, so all the vendor specific are currently marked with the modifier
onlyOwner
.This simplifies things but means that there will be many contracts in existence and a vendor needs to deploy a contract.
Investigate the possibility of using just 1 contract to manage all trades and see if that improves the UX of buyers/sellers and whether it detracts from security or overall complexity.