Skip to content

schellingLight.sol -transferEvent handler  #159

@gundas

Description

@gundas

Since schelling is a contract, when transferring COR to it the 'Token._transferToContract(...)' function will be used - it expects the receiving contract to implement the receiveToken function (and it fails in unpredictable ways if that function is not available - see issue 119 ).

It could work only if all of the COR transfers to schelling contract are made using only the Token.transferFromByModule(..) function (since it bypasses _transferToContract(...) ). But this looks kind of fragile and inconsistent.

Also, the schelling.transferEvent(...) function does not handle the case if/when the schelling contract's balance is being decreased, so potentially the rewards variable could become bigger than the balanceOf(schelling) and the newSchellingRound(...) function will fail forever until the contract is replaced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions