Contract account can opt-in asset?

thanks @fabrice for the reply. Unfortunately I didn’t understand how to transfer a teal program from outside to sandbox, can you help me?