This is only a partial answer to your question. One issue you would face is that deposits by people who buy your tokens with BTC or any other cryptocurrency besides ETH would have to be credited manually since they would not be able to interact directly with a smart contract. SONM's ICO accepted both ETH and BTC and run into quite a lot of challenges with the BTC part of the equation. See this article:
When everything got underway, the SONM ICO tokens were selling like
hot cakes. Ethereum users automatically receive their tokens, which is
always good to see. Investors relying on other cryptocurrencies –
mainly Bitcoin – have run into some issues, though. It appears
something went wrong with crediting tokens to the investors properly.
The SONM team is currently resolving this matter, although it is
likely a lot of people may see their money refunded and no tokens
issues to them.
This is one of the major problems when dealing with a cryptocurrency
ICO and accepting multiple currencies. The SNM token is an ERC20 token
issued through a smart contract on the Ethereum blockchain. Deposits
in other cryptocurrencies have no viable way to interface with this
contract directly. As a result, a lot of deposits had to be credited
manually and tokens were sent out accordingly. It appears most Bitcoin
investors have had their tokens issued to them, though, which is
positive.
According to a SONM team member, this issue arose due to an error with
the token amount return function. This issue also affected the display
of the number of tokens sold on the ICO website, which did not update
automatically in the process.
In this other StackExchange post about how to set up a multicurrency ICO, someone recommended using BTC Relay which creates a bridge between the BTC blockchain and smart contracts.
Firstly, I assume you mean a smart contract you will deploy, as you can't change the functionality of one already deployed.
With ERC20, there is no function triggered on your contract when it receives tokens, the token contract itself is all that gets called. To detect the change you would need some external program to monitor the blockchain for relevant transactions and fire some method on your contract when it finds one, but this solution isn't ideal.
Alternatively if you have full control over the software that might be sending tokens to your contract, you can have this 'approve' your contract address on the token contract, and then call a function on your smart contract which will perform the 'transferFrom' function, so you are in control of the transfer and can handle it as desired.
In either case you will need to feed your smart contract the token address in order to check balances or perform the 'transferFrom'
If you opt only for compatibility with ERC223 tokens instead, the situation is much simpler - any ERC223 token transfer to your smart contract will call the 'tokenFallback' method on your contract, so you can simply add your desired functionality there.
Best Answer
Yes, you can. If you have the address of the token, your contract can interact with it (preferably by using ERC-20's
transferFrom
function).ERC-223, like ERC-20 is a definition for a Token. If the token you're going to accept payments from implements the ERC-223 standard, you are good to use it's functionality.