git.delta.rocks / unique-network / refs/commits / a5e777ffcd7c

difftreelog

source

pallets/refungible/src/erc.rs872 Bsourcehistory
1use nft_data_structs::TokenId;2use pallet_common::erc::CommonEvmHandler;34use crate::{Config, RefungibleHandle};56impl<T: Config> CommonEvmHandler for RefungibleHandle<T> {7	const CODE: &'static [u8] = include_bytes!("./stubs/UniqueRefungible.raw");89	fn call(10		self,11		_source: &sp_core::H160,12		_input: &[u8],13		_value: sp_core::U256,14	) -> Option<pallet_common::erc::PrecompileOutput> {15		// TODO: Implement RFT variant of ERC72116		None17	}18}1920pub struct RefungibleTokenHandle<T: Config>(pub RefungibleHandle<T>, pub TokenId);2122impl<T: Config> CommonEvmHandler for RefungibleTokenHandle<T> {23	const CODE: &'static [u8] = include_bytes!("./stubs/UniqueRefungibleToken.raw");2425	fn call(26		self,27		_source: &sp_core::H160,28		_input: &[u8],29		_value: sp_core::U256,30	) -> Option<pallet_common::erc::PrecompileOutput> {31		// TODO: Implement RFT variant of ERC2032		None33	}34}