What technology helped the downfall of samurai?
Prior to that only a few harbor towns, under strict control from the Shogunate, were allowed to participate in Western trade, and even then, it was based largely on the idea of playing the Franciscans and Dominicans off against one another (in exchange for the crucial arquebus technology, which in turn was a major contributor to the downfall of the classical samurai).