File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 4848 ) -> EvmResult < CrowdloanInfo > {
4949 let crowdloan = pallet_crowdloan:: Crowdloans :: < R > :: get ( crowdloan_id) . ok_or (
5050 PrecompileFailure :: Error {
51- exit_status : ExitError :: InvalidRange ,
51+ exit_status : ExitError :: Other ( "Crowdloan not found" . into ( ) ) ,
5252 } ,
5353 ) ?;
5454
8080 let coldkey = R :: AccountId :: from ( coldkey. 0 ) ;
8181 let contribution = pallet_crowdloan:: Contributions :: < R > :: get ( crowdloan_id, coldkey) . ok_or (
8282 PrecompileFailure :: Error {
83- exit_status : ExitError :: InvalidRange ,
83+ exit_status : ExitError :: Other ( "Crowdloan or contribution not found" . into ( ) ) ,
8484 } ,
8585 ) ?;
8686
Original file line number Diff line number Diff line change 5353 fn get_lease ( _handle : & mut impl PrecompileHandle , lease_id : u32 ) -> EvmResult < LeaseInfo > {
5454 let lease =
5555 pallet_subtensor:: SubnetLeases :: < R > :: get ( lease_id) . ok_or ( PrecompileFailure :: Error {
56- exit_status : ExitError :: InvalidRange ,
56+ exit_status : ExitError :: Other ( "Lease not found" . into ( ) ) ,
5757 } ) ?;
5858
5959 Ok ( LeaseInfo {
8989 fn get_lease_id_for_subnet ( _handle : & mut impl PrecompileHandle , netuid : u16 ) -> EvmResult < u32 > {
9090 let lease_id = pallet_subtensor:: SubnetUidToLeaseId :: < R > :: get ( NetUid :: from ( netuid) ) . ok_or (
9191 PrecompileFailure :: Error {
92- exit_status : ExitError :: InvalidRange ,
92+ exit_status : ExitError :: Other ( "Lease not found for netuid" . into ( ) ) ,
9393 } ,
9494 ) ?;
9595
You can’t perform that action at this time.
0 commit comments