Attribute-based encryption (ABE) offers finegrained access control in the Internet of Things but also imposes significant performance overhead on devices. Attribute-based proxy re-encryption (AB-PRE) serves as an elegant primitive to address this issue. In traditional schemes, the re-encryption operation is performed by a third-party proxy, which can lead to centralization and single points of failure. Therefore, a distributed attribute-based proxy re-encryption scheme is proposed. The reencryption operations can be delegated to the blockchain nodes through smart contracts, significantly reducing the burden on the devices. Furthermore, data users can quickly verify the correctness of re-encrypted ciphertexts using an algorithm that incurs a constant computation cost.