How would one go by accepting btc investments for an erc20 ICO? I assume a script of some sort would be necessary, has anyone dealt with this feature previously?
There are multiple ways of doing this.
People will send BTC to your account and they will need to trust to that you will take each sender and give them their ERC20 tokens. This is easily done by seeding the smart contract with the owners of the tokens and the respective number.
You need to get all the transactions that enter your Bitcoin wallet and save the respective amounts. Next you need to write some code that will generate a bit of solidity code. The code you need to generate could look like this
balanceOf["0x3E65303043928403F8A1a2CA4954386E6f39008c"] = 1000 balanceOf["0x4C109f7B95295b6c7aCf6C2617A2f4441Fb1A773"] = 5000
And so on. Code that can be added in the constructor function of your token smart contract. Each Ethereum address should correspond to the people who send the Bitcoin (the ones scraped before) and the value is the corresponding number of tokens for their participation. For example if account
0x4C109f7B95295b6c7aCf6C2617A2f4441Fb1A773 sent 0.5 Bitcoin and 1 Bitcoin buys you 10000 ERC20 of your tokens, he needs to be seeded with
balanceOf["0x4C109f7B95295b6c7aCf6C2617A2f4441Fb1A773"] = 5000
You can use http://btcrelay.org/ to verify a transaction happened on the Bitcoin network